Two Networks
Lesson 14 of 35 in Coddy's LAN Labs course.
A router is a device with a foot in several networks: one interface per network, each with its own address inside that network. Traffic that must cross from one network to another goes through it.
Because a router has many interfaces, you name the one you are configuring: netlab ip ROUTER IFACE ADDR/PREFIX. netlab numbers router interfaces eth0, eth1, ... in the order they were cabled. By convention the router takes the first usable address of each network, the .1.
netlab show ip lists every interface in the lab, so it is the place to confirm a router really sits in both networks.
Challenge
EasyRouter r1 is cabled to switch sw1 (eth0, pc1's network 192.168.1.0/24) and directly to pc3 (eth1, network 10.0.0.0/24). Give r1 the .1 address in each network, then show the addressing view.
Expected output:
r1 eth0: 192.168.1.1/24 (mask 255.255.255.0, network 192.168.1.0/24)
r1 eth1: 10.0.0.1/24 (mask 255.255.255.0, network 10.0.0.0/24)
NODE IFACE ADDRESS MASK GATEWAY
pc1 eth0 192.168.1.10/24 255.255.255.0 -
pc3 eth0 10.0.0.20/24 255.255.255.0 -
r1 eth0 192.168.1.1/24 255.255.255.0 -
r1 eth1 10.0.0.1/24 255.255.255.0 -Try it yourself
All lessons in LAN Labs
4Routers and Gateways
Two NetworksThe Default GatewayBoth Sides Need a Way BackRouting TablesRecap - Connect the Floors2Addresses on the LAN
Giving a Host an AddressThe First PingWhat ARP LearnedThe Switch Learns TooRecap - First Conversation8Capstone - Fix the Branch
Survey the DamageFix the Address ClashMasks and GatewaysRecap - Prove It WorksPractice on your own: Terminal playground