The routing table on morgan should look exactly like the initial routing table on tristan.Compare the routing tables in Example 1.1, “Sample ifconfig output” and Example 1.8, “Adding a default route with route ”. These changes to the routing table on morgan will stay in effect until they are manually changed, the network is restarted, or the machine reboots.
ifconfig is deprecated on Linux and furthermore, it's the wrong tool for the job. To set the default gateway on Linux use the ip command as follows: ip route add default via
How To Configure A Default Gateway on CentOS - LinuxAdmin.io
macos - How to get default gateway in Mac OSX - Stack Overflow Thanks. You just saved me a few hours at the new house when Time Warner's modem decided it wanted the IP my router used to have, and ifconfig lied about the gateway. – Chris Doggett Jun 20 '13 at 3:05
If you no longer need the default gateway set and would like to change, you can delete currently set using: $ ip route del default via 18.104.22.168 dev eth1 Conclusion. Hope this guide- ifconfig vs ip usage guide on Linux has been helpful in getting familiar with ip and ifconfig command line tools used to manage networking on Linux.
Feb 19, 2019 · Using ifconfig. It’s sad for us UNIX/Linux nerds, but using ifconfig is now the “old” way of doing things. 1. Set Your IP Address. ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up 2. Set Your Default Gateway. route add default gw 192.168.1.1 3. Set Your DNS Server. Yes, 22.214.171.124 is a real DNS resolver by CloudFlare. echo "nameserver 1.1