Changing your default gateway
Your server needs to have a single default gateway. DHCP servers will automatically assign a default gateway to DHCP configured NICs, but NICs with configured static IP addresses will need to have a manually configured default gateway. This can be done with a simple command. Here is the command.
-------------[root@Basil15099/~# route add default gw 192.168.1.1 wlan0-------------
In this case, make sure that the router/firewall with IP address 192.168.1.1 is connected to the same network as interface wlan0!
Once done, you'll need to update your
-------------/etc/sysconfig/network
file to reflect the change. This file is used to configure your default gateway each time Linux boots.NETWORKING=yes
HOSTNAME=bigboy
GATEWAY=192.168.1.1
-------------
HOSTNAME=bigboy
GATEWAY=192.168.1.1
-------------
Can you find an alternative to editing the file /etc/sysconfig/network ?? Ah.. yes, we can put the above command in rc.local file as well so that gateway will be configured at the end of every reboot.
ليست هناك تعليقات:
إرسال تعليق