/ # ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) / # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo / # cat /etc/network/interfaces # Configure Loopback auto lo iface lo inet loopback / # cat /proc/cmdline root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none / # ethtool eth0 Settings for eth0: Supported ports: [ TP AUI BNC MII FIBRE ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: MII PHYAD: 8 Transceiver: external Auto-negotiation: on Link detected: no / # ethtool -S eth0 NIC statistics: rx_packets: 0 tx_packets: 0 rx_bytes: 0 tx_bytes: 0 rx_errors: 0 tx_errors: 0 rx_dropped: 0 tx_dropped: 0 good_octets_received: 0 bad_octets_received: 0 internal_mac_transmit_err: 0 good_frames_received: 0 bad_frames_received: 0 broadcast_frames_received: 0 multicast_frames_received: 0 frames_64_octets: 0 frames_65_to_127_octets: 0 frames_128_to_255_octets: 0 frames_256_to_511_octets: 0 frames_512_to_1023_octets: 0 frames_1024_to_max_octets: 0 good_octets_sent: 0 good_frames_sent: 0 excessive_collision: 0 multicast_frames_sent: 0 broadcast_frames_sent: 0 unrec_mac_control_received: 0 fc_sent: 0 good_fc_received: 0 bad_fc_received: 0 undersize_received: 0 fragments_received: 0 oversize_received: 0 jabber_received: 0 mac_receive_error: 0 bad_crc_event: 0 collision: 0 late_collision: 0 lro_aggregated: 0 lro_flushed: 0 lro_no_desc: 0 / # rcuser start Starting user: OK. / # grep -q "ip=" /proc/cmdline / # echo $no_defaults / # loadsave_settings -rs ip=10.20.0.200; mask=255.255.255.0; gw=10.20.0.100; ns1=10.20.0.12; ns2=10.20.0.20; host=dns321; domain=workgroup / # echo $cip / # res=$(loadsave_settings -rs) / # cip="sib" / # eval $res / # ifconfig eth0 up $ip netmask $mask / # eth0: link up, 1000 Mb/s, full duplex, flow control disabled / # route add default gw $gw / # echo "nameserver $ns1" >> /etc/resolv.conf / # echo "nameserver $ns2" >> /etc/resolv.conf / # hostname $host / # / # echo $host dns321 / # echo $gw 10.20.0.100 / # echo $ip 10.20.0.200 / # echo $mask 255.255.255.0 / # echo $ns1 10.20.0.12 / # echo $ns2 10.20.0.20 / # ifconfig eth0 | awk '/inet addr/ { print substr($2, 6) }' 10.20.0.200 / # hostip=$(ifconfig eth0 | awk '/inet addr/ { print substr($2, 6) }') / # ifconfig eth0 | awk '/inet addr/ { print substr($4, 6) }' 255.255.255.0 / # netmask=$(ifconfig eth0 | awk '/inet addr/ { print substr($4, 6) }') / # ipcalc -n $hostip $netmask NETWORK=10.20.0.0 / # eval $(ipcalc -n $hostip $netmask) / # route -n | awk '$1 == "0.0.0.0" { print $2 }' 10.20.0.100 / # gateway=$(route -n | awk '$1 == "0.0.0.0" { print $2 }') / # ifconfig eth0 | awk '/inet addr/ { print substr($3, 7) }' 10.20.0.255 / # broadcast=$(ifconfig eth0 | awk '/inet addr/ { print substr($3, 7) }') / # ifconfig eth0 | awk '/MTU/{print substr($5,5)}' 1500 / # mtu=$(ifconfig eth0 | awk '/MTU/{print substr($5,5)}') / # hostname dns321 / # echo $domain workgroup / # cat /etc/hosts 127.0.0.1 localhost / # echo "$hostip $(hostname).$domain $(hostname)" >> /etc/hosts / # cat /etc/hosts 127.0.0.1 localhost 10.20.0.200 dns321.workgroup dns321 / # sed -i "s|^A:.*#!# Allow local net.*$|A:$NETWORK/$netmask #!# Allow local ne t|" /etc/httpd.conf / # sed -i "s|hosts allow = \([^ ]*\) \([^ ]*\)\(.*$\)|hosts allow = 127. $NETWO RK/${subnet}\3|" /etc/sam sed: /etc/sam: No such file or directory / # cat /etc/network/interfaces # Configure Loopback auto lo iface lo inet loopback / # / # cat<<-EOF > /etc/network/interfaces > auto lo > iface lo inet loopback > > auto eth0 > iface eth0 inet static > address $hostip > netmask $netmask > broadcast $broadcast > gateway $gateway > mtu $mtu > EOF / # cat /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 10.20.0.200 netmask 255.255.255.0 broadcast 10.20.0.255 gateway 10.20.0.100 mtu 1500