Exam paper

General chat concerning linux or linuxzoo.

Moderator: drgrussell

Post Reply
hakim3uk
Posts: 2
Joined: Fri Nov 28, 2008 5:42 pm

Exam paper

Post by hakim3uk » Fri Nov 28, 2008 6:19 pm

Hi Gordon
i tried to find a solution for question 7 on exam paper dated 05/06 semester1
The ethernet devices shown are from the point of view of M1.
Assume MGW is the gateway machine for this cluster of machines.
Also from the viewpoint of M1, the following is known:

Eth0 : 162.2.1.20/16
Eth1 : 162.1.1.3/24
Eth2 : 162.1.2.5/24

MGW is 162.2.1.1
M2 is 162.1.1.4
M3 is 162.1.2.10

1- Supply ifconfig lines for this scenario for use on M1?
2- Continuing from the previous question, supply ip route commands for M2?

my solution is:
1- Ifconfig eth0 162.2.1.20 broadcast 162.2.255.255 netmask
255.255.0.0
Ifconfig eth1 162.1.1.3 broadcast 162.1.255.255 netmask
255.255.255.0
Ifconfig eth2 162.1.2.5 broadcast 162.1.255.255 netmask 255.255.0.0

2- ip route add 162.1.1.3/24
ip route add 162.2.1.20/16

i am not sure if this is correct or not, could you please explain to me the solution.

Thank you

Hakim

drgrussell
Site Admin
Posts: 426
Joined: Sat Feb 12, 2005 8:57 pm
Are you a robot or a human?: Human

Post by drgrussell » Fri Nov 28, 2008 8:39 pm

You say
Eth2 : 162.1.2.5/24
Then
Ifconfig eth2 162.1.2.5 broadcast 162.1.255.255 netmask 255.255.0.0

That looks right if it was /16. 255.255.255.0 and 162.1.2.255 would be better!

In your second question, you say:
ip route add 162.1.1.3/24
ip route add 162.2.1.20/16

Is it not something like "ip route add IP/MASK dev eth0" for the first one, and "ip route add default via IP" for the second.

And in the first 162.1.1.3 is an IP of a machine not an network. 162.1.1.0/24 would be better. The default route is an IP not a network therefore has no mask. It should have been 162.1.1.3 (the ip no of the gateway's eth1).

In short, maybe 2 marks for the first one (mostly right) and 0 for the second.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests