Day 6 (Communication between 2 IP subnets)
1. Static route on a computer (Windows)
2. Default route/Default gateway
3. Trunking between a switch and a router
1. Static route on a computer (Windows)
If Host A wants to communicate with Host B, either host must know how to reach to the other. In other words, proper routes must exist on both hosts.
It is a very important and fundamental concept of routing.
Ask at least 2 questions, all the time.
- Does host A have a route to reach host B?
- And does host B have a route to get back to host A?
On a windows computer, static routes are configured as in following format
route add
e.g. route add 192.168.10.0 mask 255.255.255.0 172.16.31.126
On a Cisco router, static routes are configured as in follwing format.
ip route
e.g. ip route 192.168.10.0 255.255.255.0 172.16.31.126
2. Default route/Default gateway
Default route is used when a host/router does not have more specific route.
On a home computer network, default route is the only route and it is automatically assigned to a home computer by the home router via DHCP.
Default route is represented by network address 0.0.0.0, mask 0.0.0.0.
Default gateway is the IP address used by default route.
On a home computer network, default gateway is the IP address of LAN interface of the home router.
On a Cisco router, default gateway is also known as "gateway of last resort".
To configure a default gateway on a Cisco router, a default route is configured as in following format.
ip route 0.0.0.0 0.0.0.0
e.g. ip route 0.0.0.0 0.0.0.0 172.16.31.1
3. Trunking between a switch and a router
A trunk is a single physical connection that can carry more than 1 Vlan.