Manually setting up a network interface. This can come in handy if you need networking but don’t have any network scripts to rely upon. Setting up a NIC manually is no big deal, so here’s how to do it.
Setting up a Static IP
- load the network driver
- Set up your local loopback
- Set up your ethernet card
- View the results
- ifconfig
- route -n
insmod your_drivername
ifconfig lo 127.0.0.1 route add 127.0.0.0 lo
ifconfig eth0 192.168.0.2 netmask 255.255.255.0 route add 192.168.0.2 eth0
FIXME: Insert ifconfig sample here showing the result of the above configuration statements.
route -n Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
FIXME: Make sure the above listing is correct according to the above configuration statements.
Setting up a Dynamic IP:
You won’t have an UH entry in the route table.
You won’t assign an IP to eth0, you will run pump -i eth0
FIXME: Insert more content here showing the same ideas that the static ip showed.
Note: The following was able to get me up and going using some Linux install disks:
ifconfig lo 127.0.0.1
ifconfig eth0 192.168.0.2 netmask 255.255.255.0
route add 192.168.0.2 eth0
route add 127.0.0.1 lo