Skip to main content
Formatting
Source Link
DopeGhoti
  • 79.2k
  • 10
  • 107
  • 141

To add a default GWgateway, and not one specific to an Ethernet interface (dev), use:

For IPv4 #route add default gw

For IPv6, you must specify the Address Family (AF) #route add -A inet6 default gw

route add default gw <GW IP Address> # For IPv4
route add -A inet6 default gw <GW IP Address> # For IPv6; you must specify the Address Family (AF)

Notice, you don't have to specify the GW subnet mask, nor the outgoing Ethernet interface.

To verify your work, list the host's IP routing table suing:

For IPv4 #netstat -rn

For IPv6 #netstat -rn -A inet6

Best of luck,

netstat -rn # for IPv4
netstat -rn -A inet6  # for IPv6

To add a default GW, and not one specific to an Ethernet interface (dev), use:

For IPv4 #route add default gw

For IPv6, you must specify the Address Family (AF) #route add -A inet6 default gw

Notice, you don't have to specify the GW subnet mask, nor the outgoing Ethernet interface.

To verify your work, list the host's IP routing table suing:

For IPv4 #netstat -rn

For IPv6 #netstat -rn -A inet6

Best of luck,

To add a default gateway, and not one specific to an Ethernet interface (dev), use:

route add default gw <GW IP Address> # For IPv4
route add -A inet6 default gw <GW IP Address> # For IPv6; you must specify the Address Family (AF)

Notice, you don't have to specify the subnet mask, nor the outgoing Ethernet interface.

To verify your work, list the host's IP routing table suing:

netstat -rn # for IPv4
netstat -rn -A inet6  # for IPv6
Source Link

To add a default GW, and not one specific to an Ethernet interface (dev), use:

For IPv4 #route add default gw

For IPv6, you must specify the Address Family (AF) #route add -A inet6 default gw

Notice, you don't have to specify the GW subnet mask, nor the outgoing Ethernet interface.

To verify your work, list the host's IP routing table suing:

For IPv4 #netstat -rn

For IPv6 #netstat -rn -A inet6

Best of luck,