3
2
In a host system, a gateway generally refers to the IP address of either a router or a network segment. Generally, the output of route PRINT
or route -n
corroborates to the actual IP of my gateway.
D:\temp>route PRINT
===========================================================================
Interface List
61...20 68 9d 64 a4 ea ......Bluetooth Device (Personal Area Network)
47...60 67 20 b1 5c 9a ......Intel(R) Centrino(R) Advanced-N 6205
43...d4 be d9 60 de 2b ......Intel(R) 82579LM Gigabit Network Connection
142...08 00 27 00 98 7d ......VirtualBox Host-Only Ethernet Adapter
1...........................Software Loopback Interface 1
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.100 25
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
For a guest system, what is the gateway IP when using NAT? As an example, when I issued the following command route -n
, the output is
abhijit@abhijit-VirtualBox ~ $ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.3.2 0.0.0.0 UG 0 0 0 eth1
10.0.3.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1
Why is this Gateway IP 10.0.3.2 and how is it assigned?