Professional Documents
Culture Documents
Telecommunications Laboratory
laboratory guide
Table of Contents
1 – Overview........................................................................................................................................3
1.1 – Physical Layer and Interfaces.................................................................................................3
1.2 – Data Layer...............................................................................................................................3
1.3 – Network Layer........................................................................................................................4
1.4 – Transport Layer.......................................................................................................................7
2 – Measurement Tasks........................................................................................................................8
2.1 – Physical Layout.......................................................................................................................8
2.2 – Task List..................................................................................................................................8
3 – Questions......................................................................................................................................13
1 – Overview
Routers work mainly in the Network Layer (sometimes referred to the “third layer”, referring to its
place in the OSI model). They take the packets in, read their headers, recalculate and rewrite it, and
send the packets on their way with the new header. The packets can be forwarded in the following
manners:
• unicast – when the packet is for a certain recipient
• anycast – when the packet is for any one of a number of recipients
• broadcast – when the packet is for every endpoint within a certain network
Forwarding packets on a network is done by routers. They use the information in the IP headers to
decide how to regenerate the packet’s header, and on which interface should the router send the
packet out. The following things are taken into consideration by the routers when doing their job:
• Which bits of the destination address code the network address. (A router between networks
doesn’t have to take into account the whole address. It just have to route the packet to the
network where the destination is in, and that subnetwork’s router will use the rest of the
address to deliver the package to the specific endpoint.)
• Which networks can be accessed on which physical interfaces of the router. This
information is stored in the routing table.
• When no routing information can be found what should be the last resort route to send the
packets to.
As we saw before, the IP header has no information about the network address. But some kind of
agreement has to be made how to divide the 32 bits up to a network address and host address. There
are a bunch of networks around with different sizes, so a static method isn’t feasible. So when IP
networks were defined (in RFC 791) classes of IP addresses were defined. The first few bits were
supposed to define the class of an IP address, then the rest was shared between the network and the
hosts in a predefined manner:
Network Host
A class address space 0xxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 0-127.x.x.x
bitmask 11111111 00000000 00000000 00000000 255.0.0.0
Network Host
B class address space 10xxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 128-191.x.x.x
bitmask 11111111 11111111 00000000 00000000 255.255.0.0
Network Host
C class address space 110xxxxx xxxxxxxx xxxxxxxx xxxxxxxx 192-239.x.x.x
bitmask 11111111 11111111 11111111 00000000 255.255.255.0
D class 1110xxxx xxxxxxxx xxxxxxxx xxxxxxxx 224-239.x.x.x
E class 1111xxxx xxxxxxxx xxxxxxxx xxxxxxxx 240-254.x.x.x
This worked well, until the number of networks multiplied beyond a certain point; the A class
defined needlessly big networks, and the demand for B classes were much larger than ever
anticipated. To solve this problem the system has been amended, and classless IP addresses was
introduced.
Let’s see an example of a classless IP! Our address now is 193.10.24.129/30. The “/30” part means
that the division between the network address and the host address is after the 30th bit, so only the
last two bits are used to identify endpoints in this network. The subnet mask is not neatly on the
octet borders this time; it’s 255.255.255.252. Doing the same binary calculation as before:
193. 10. 24.129 = 11000001.00001010.00011000.10000001
255.255.255.252 = 11111111.11111111.11111111.11111100 AND
-------------------------------------------------------------
193. 10. 24.128 = 11000001.00001010.00011000.10000000
Our network address is the one in the last row. We have “room” for another endpoint at
193.10.24.130 in our subnet (.1000 0010 binary as the last octet), and the 193.10.24.131 address is
our broadcast address (.1000 0011 binary as the last octet).
The broadcast address is the network address plus all the bits of the host address set to ones. This
means that every endpoint on the network gets it. This also means, that with n bits used to denote
hosts we can give address to 2n-2 hosts. The 2n part is trivial because of the use of binary, but we
have to subtract the case when every host bit is 0 (that’s the network address), and the case when
every bit is 1 (that’s the broadcast address).
That’s how in our last example with 2 bits we have 22-2 = 2 hosts.
After switching the router on you will be configuring it using this connection. The PC should get its
IP configuration from the DHCP server. (If there is a manual IP address set then switch it to
automatic.)
1. To configure the router you should check the address of the Default Gateway (Windows
terminology) or Default Route (under Linux). On the graphical interface you can click the
icon, then click 'Properties'.
Alternatively you can start a command line, and use written commands. Under Windows:
Win+R (run), "cmd", OK. The command to use is "ipconfig /all", this lists all properties of
all network connections. Under Linux Ctrl-Alt-T brings up the terminal, and "ifconfig" is the
command to list all the information about the network connections.
2. Log in to the administration interface of the router. Open up any browser installed on the
PC, and type in the IP address that you got in the step before. (Sometimes you can use
vendor-specific shortcuts here, like http://tplinklogin.net ) Use the following login info:
User name: admin
Password: admin
These factory default logins are printed on the bottom label of the router, and they must be
changed in any real world scenario during the initial setup of the device.
3. In the setup interface, under 'Network' / 'WAN' choose 'Dynamic IP' as a connection type:
4. Under 'Wireless' / 'Wireless Settings' set the SSID (or network name) to "Router A" at one of
the lab spots and "Router B" at the other. The region should be "Hungary", and the mode
should be "11bgn mixed". Let the other settings on "Auto" for now.
5. Open LinSSID on the PC. Click 'Run', and evaluate the results given. What does the graph
shows us here? (What's on the horizontal and vertical axes?) Choose 5 networks and explain
it using those as specific examples.
Return to the router settings page. Under 'Wireless' / 'Wireless Settings' choose a channel
now, and set different channel widths. Observe each change in LinSSID. What is the
purpose of the automatic channel selection?
6. Under 'Wireless' / 'Wireless Security' set "WPA/WPA2 – Personal", with version "WPA2-
PSK" and encryption "AES". Set a password. Verify the changes with LinSSID.
7. Under 'Wireless' / 'Wireless MAC filtering' ban the other lab spot's PC from your network.
You can use the "ifconfig" command to determine the MAC address of a machine. Be
advised: every network interface (wired or wireless) has its own MAC address.
Connect one of the 4 ports on each table's switching box to the WAN port of the router. Try
to connect to the router with the other machine now. What is happening?
8. Under 'DHCP' set the address range to start from 192.168.0.110 and end at 192.168.0.150.
What will we see in the IP configuration, if we reconnect?
9. Under 'Wireless' / 'Wireless Advanced' set the transmit power to Low/Medium/High, and
check each setting in LinSSID. What can you see on the graph, and why?
10. Under 'Access Control' / 'Target' add the following domain name to the firewall: www.uni-
obuda.hu, like this:
Don't forget to click 'Save'! Then under 'Access Control' / 'Host' select the host to be
firewalled by MAC address (use "ifconfig" again, if needed):
Under 'Access Control' / 'Schedule' set the time interval to include the time of the class:
And finally build the firewall rule under 'Access Control' / 'Rule':
Now go to 'Access Control', and enable the firewall. Set it so it will deny the packets that
fall under the rules:
Verify with your browser that you can't visit the firewalled domain, www.uni-obuda.hu
11. Change the password to "kando" under 'System Tools' / 'Password':
13. Reset the router to factory defaults under 'System Tools' / 'Factory Defaults'.
3 – Questions
1. What is a SSID?
2. Explain in detail what a MAC address, and an IPv4 address is. Where do we use these
addresses? What is their purpose?
3. What are the differences between a switch and a router?
4. Explain IP classes. What's the purpose of a subnet mask?
5. Explain classless IP addresses.
6. When do we use Network Address Translation? Show how the process works with an
example.
7. What can we knew about the following IP addresses? Explain in detail, and write them
down in binary form. Are they valid addresses?
◦ 192.168.1.2 /24
◦ 10.10.10.10 /8
◦ 134.146.243.175 /29
◦ 102.244.96.236 /27
◦ 85.247.256.14 /30