۱۳
اسفند
1-show gateway(s):
- route
- route -n
- ip route show
- ip route list
Add route:
- route add default gw {IP-ADDRESS(router IP)} {INTERFACE-NAME}
- route add default gw 192.168.1.254 eth0 #Route all traffic via 192.168.1.254 gateway connected via eth0 network interface:
- ip route add 192.168.1.0/24 dev eth0 #to route all traffic via 192.168.1.254 gateway connected via eth0 network interface:
- ip route add 192.168.1.0/24 via 192.168.1.254 #to route all traffic via 192.168.1.254 gateway connected via eth0 network interface:
Delete rout
- ip route del default via 192.168.122.1 dev eth0
GUI(set configuration from ui)
- redhat-config-network #if your are using Red Hat/CentOS/Fedora core Linux type this
- network-admin #If you are using other Linux distribution use this