Our entire address space is 202.144.139.0/24
202.144.139.0 = 11001010 10010000 10001011 00000000
Prefix /24 ++++++++++++++++++++++++++
Host part xxxxxxxx
Total number of IPs = 2^8 = 256 (00000000 to 11111111)
Lowest IP: 11001010 10010000 10001011 00000000 = 202.144.139.0
Highest IP: 11001010 10010000 10001011 11111111 = 202.144.139.255
For this exercise, we will divide this up as follows:
+-------+-------+-------+-------+-------+-------+---------------+
|.0/29 |.8/29 |.16/29 |.24/29 |.32/29 | | |
| 0-7 | 8-15 | 16-23 | 24-31 | 32-39 | | |
+-------+-------+-------+-------+-------+-------+---------------+
separate subnet for each group
...
+---------------------------------------------------------------+
|.192/26 |
| 192 - 255 |
+---------------------------------------------------------------+
backbone
TABLE ONE
202.144.139.192/26 Classroom backbone
------------------ ------------------
202.144.139.193 Group one (PC1-3) border router
202.144.139.194 Group two (PC4-6) border router
202.144.139.195 Group three (PC7-9) border router
202.144.139.196 Group four (PC10-12) border router
202.144.139.197 Group five (PC13-15) border router
Q. What is the netmask for a /26 network? ______________________
There are separate /29 networks for the *private* networks between machines
on each desktop
TABLE TWO
202.144.139.0/29 Group one
202.144.139.8/29 Group two
202.144.139.16/29 Group three
202.144.139.24/29 Group four
202.144.139.32/29 Group five
Q. What is the netmask for a /29 network? ______________________
Each group has one machine which will be the ROUTER, two machines which are CLIENTS, and a private ethernet network (hub) between them.
CLIENT CLIENT ROUTER
+-------+ +-------+ +-------+ 202.144.139.___
| PC __ | | PC __ | | PC __ |----------> to backbone
+-------+ +-------+ +-------+ xl1
| xl0 | xl0 | xl0
| 202.144.139.___ | 202.144.139.___ | 202.144.139.___
| | |
| +-----+ |
+------------------ | hub | ------------------+
+-----+
Don't change /etc/rc.conf, because we don't want these changes to be permanent. The commands you will need are:
ifconfig # show interfaces
ifconfig xl0 x.x.x.x/p # configure interface
ifconfig xl0 x.x.x.x netmask y.y.y.y # (alternative form)
netstat -nr # show routes (ignore ipv6)
route add x.x.x.x/p z.z.z.z # add a route to network x.x.x.x/p
# via next-hop z.z.z.z
route add -net x.x.x.x -netmask y.y.y.y z.z.z.z # (alternative form)
route delete x.x.x.x/p # delete a route
route delete default # delete defaultroute
ping x.x.x.x # send test packets (Ctrl-C to stop)
traceroute -n x.x.x.x # show route to destination
Remember that the next hop gateway (z.z.z.z) must be an address on one of the networks which you are DIRECTLY connected to.
Can you ping other routers on the backbone? Can you ping other clients in other groups? Debug the problems.