Linux Network commands

RESTART
# /etc/init.d/networking restart
SHOW ROUTING TABLE
# netstat -rn
# route –n
Add route
# route add -net 10.4.1.0/24 gw 192.168.200.247
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.200.240 0.0.0.0 255.255.255.240 U 0 0 0 eth0
10.4.1.0 192.168.200.247 255.255.255.0 UG 0 0 0 eth0
0.0.0.0 192.168.200.254 0.0.0.0 UG 0 0 0 eth0
SHOW SERVICE PORT
# netstat -tanp