Securing-Optimizing-RH-Linux-1_2_99
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca
© Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ®
99
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1295 errors:0 dropped:0 overruns:0 frame:0
TX packets:1163 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:5 Base address:0xa320
lo
Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:139 errors:0 dropped:0 overruns:0 frame:0
TX packets:139 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
NOTE: It is important to note that the setting configured with the ifconfig toll for your network
devices, will not survive a reboot.
·
To assign the default gateway for 208.164.186.1 use the command:
[root@deep /]# route add default gw 208.164.186.1
In this example, the default route is set up to go to 208.164.186.1, your router.
Verify that you can reach your hosts. Choose a host from your network, for instance
208.164.186.1.
·
To verify that you can reach your hosts, use the command:
[root@deep /]# ping 208.164.186.1
The output should look something like this:
[root@deep networking]# ping 208.164.186.1
PING 208.164.186.1 (208.164.186.1) from 208.164.186.2 : 56 data bytes
64 bytes from 208.164.186.2: icmp_seq=0 ttl=128 time=1.0 ms
64 bytes from 208.164.186.2: icmp_seq=1 ttl=128 time=1.0 ms
64 bytes from 208.164.186.2: icmp_seq=2 ttl=128 time=1.0 ms
64 bytes from 208.164.186.2: icmp_seq=3 ttl=128 time=1.0 ms
--- 208.164.186.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 1.0/1.0/1.0 ms
You should now display the routing information with the command route to see if both hosts have
the correct routing entry:
·
To display the routing information, use the command:
[root@deep /]# route -n
The output should look something like this:
Kernel IP routing table
Destination
Gateway
Genmask
Flags
Metric
Ref
Use
Iface
208.164.186.2
0.0.0.0
255.255.255.255
UH
0
0
0 eth0
208.164.186.0
208.164.186.2
255.255.255.0
UG
0
0
0 eth0
208.164.186.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