0% found this document useful (0 votes)
6 views52 pages

Workshop 1 - Number System and Static Routing v2

Uploaded by

thirstybird48
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views52 pages

Workshop 1 - Number System and Static Routing v2

Uploaded by

thirstybird48
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 52

NIT2222: Network Technologies

Session 1: Number System


and IP addressing

Unit Convener: Dr Assefa K Teshome


Office Room: D640, Footscray Park campus
Email: [email protected]

VICTORIA UNIVERSITY - RTO Code 3113,


CRICOS Provider Code 00124K (Melbourne), 02475D (Sydney)
Updated: 4 September 2020
Sessio1: Road Map

Session 1

Number Systems IP address


Number System Static Routing
Conversions Conversion

2
Number Systems

 Why number system?


 IP addressing
 Number systems
 The decimal system
 Binary system
 Hexadecimal system

1-3 3
Why number systems?
 Internet has millions of devices
 Each device needs an ID to be identified for communicated
 The networked devices form a certain structure: to “route” to the target device, we
need the address
 Network address is a logic address to tell where it is

4
IP addressing: introduction

 IP address: 32-bit
identifier for host,
router interface
 IP addresses
associated with each
interface

Two representations: decimal & binary

172.1.1.1 = 11011111 00000001 00000001 00000001

172 1 1 1

It is a logic address: when the device moves, the address changes.

5
The decimal system (base 10)

The word decimal is derived from the Latin root decem (ten). In this system
the base b = 10 and we use ten symbols

S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}

The symbols in this system are often referred to as decimal digits or just
digits.

6
Binary system (base 2)

The word binary is derived from the Latin root bini (or two by two). In this
system the base b = 2 and we use only two symbols,

S = {0, 1}
The symbols in this system are often referred to as binary digits or bits
(binary digit).

Example: binary number 11001

The equivalent decimal number is 25.

7
Hexadecimal system (base 16)

The word hexadecimal is derived from the Greek root hex


(six) and the Latin root decem (ten). In this system the
base b = 16 and we use sixteen symbols to represent a
number. The set of symbols is
S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}

Note that the symbols A, B, C, D, E, F are equivalent to 10, 11, 12, 13, 14,
and 15 respectively (often referred to as hexadecimal digits)

Example: Hexadecimal number 2AE

The equivalent decimal number is 686.


8
Number System Conversions

 Decimal to Binary
 Binary to Decimal
 Decimal to Hexadecimal
 Hexadecimal to Decimal
 Binary to Hexadecimal
 Hexadecimal to Binary

9
Conversion: decimal to binary

How to convert 35 in decimal to binary?


• Start with the number in decimal,
• Move to the left while continuously finding the
quotients and the remainder of division by 2.
The result is 35 = (100011)2.

10
Class Practice:
convert 39 in decimal to binary?

(100111)2

convert 135 in decimal to binary?

(1000111)2

11
Conversion: binary to decimal

How to convert binary number 10100101 to decimal ?


• break the number as the sum of numbers that are
equivalent to the binary place values shown:

12
Class Practice

Convert (10101)2 in binary to decimal ?


21

Convert (1010 1101)2 in decimal to binary?


173

13
Conversion: decimal to hexadecimal

How to convert 126 in decimal to its equivalent in the


hexadecimal system?
• We move to the left while continuously finding the
quotients and the remainder of division by 16. The
result is 126 = (7E)16

14
Class Practice:
convert 39 in decimal to hexadecimal?

(27)16

convert 172 in decimal to hexadecimal?

(AC)16

15
Conversion: hexadecimal to decimal

Example: Hexadecimal number 2AE

The equivalent decimal number is


N = 512 + 160 + 14 = 686.

16
Class Practice:
convert (AB)16 in hexadecimal to decimal?

(171)10

convert (21F)16 in hexadecimal to decimal?

(543)10

17
Conversion: binary to hexadecimal

Show the hexadecimal equivalent of the binary number


(110011100010)2.
Solution
We first arrange the binary number in 4-bit patterns:

1100 1110 0010


12 14 2
(C E 2)16
Note that the leftmost pattern can have one to four bits.
We then use the equivalent of each pattern shown in
previous table to change the number to hexadecimal:
(CE2)16.

18
Class Practice
Convert (1001 1111 1010)2 in decimal to hexadecimal?
(9 F A)16

Convert (11 0101 0111)2 in decimal to hexadecimal?


(3 5 7)16

19
Conversion: hexadecimal to binary

What is the binary equivalent of (24C)16?

Solution
Each hexadecimal digit is converted to 4-bit patterns:

2 → 0010, 4 → 0100, and C → 1100

The result is (001001001100)2.

20
IP Address Conversions
 IP(v4) Addresses
 Classful IP addresses
 Special IP addresses

21
IP Address
It is essential to be able to convert between binary and decimal numbers
Especially when you design a network with variable size of sub-networks (different size
of departments, divisions)
Simply checking subnet table can lead to improper design
Each octet of IP has 8 bits of binaries
Its decimal range is from 0 to 255
0000 0000 to 1111 1111

22
IP Address
IP v4 address is 32 bits.
It writes in 4 octets, each has 8 bits
In decimal form: 129.9.17.1
In binary form:
1000 0001. 0000 1001. 0001 0001. 0000 0001

23
Class Practice
Convert this IP address from Binary to Decimal:
1000 0000. 0000 0001. 0000 1001. 0000 1111

128.1.9.15

Convert this IP address from Decimal To Binary:


130.9.16.3

1000 0010. 0000 1001. 0001 0000. 0000 0011

24
IP network design & implementation

 Step 1 IP design
 Step 2 Physical
Connection
 Step 3 Allocating IP
addresses
 Step 4 Design
configuration scripts for
Router
 Step 5: Configure host

1-25 25
Step 1: IP design
Choose one of the class A network
50. x. x. x

Here x.x.x can range from


00000000.00000000.00000000
To
11111111.11111111.11111111
Convert to decimal:
0.0.0 to 255.255.255

26
Step 1: IP design – IP range
First address is the network address,
here it is 50.0.0.0
It cannot be allocated to hosts.
It is used by routers in routing.

Last address is the broadcasting address,


here it is 50.255.255.255
It cannot be allocated to hosts.

So the IP range is: 50.0.0.1 to 50.255.255.254 in total:


256 x 256 x 256 – 2 ip addresses can be used for hosts

Router normally will take the first address (some designer likes to use the last address):
50.0.0.1

Let’s note down these number on your draft.

27
Step 1: Network Mask
Network mask is setting all network bits as 1, and host bits as 0
Here octet1 is the network part, and octet 2-4 are the host part
So the network mask for class A network is
255.0.0.0

or
11111111.00000000.0000000.00000000

28
Step 2: Physical Connection Design
Router interface connecting to our network is the gateway for all the hosts to reach
external networks
Routers have multiple interfaces connecting to different networks, they route “data traffic”
from one network to another

29
Step 2: Physical Connection Design
Mark all the interfaces

30
Step 3: Allocating IP addresses
F0/4 F0/5
F0/0

R205- f0/0
IP: 50.0.0.1 mask: 255.0.0.0

S205 layer 2, data link, does not need IP address

PC105 (T105 in some lab equipment label)


IP: 50.0.0.2 (can be anything within the range worked out in the earlier step)
Mask: 255.0.0.0 (same network mask is always the same)
Gateway: 50.0.0.1 (the router interface IP)
31
Step 4: Design configuration scripts for Router
enable
config terminal
int f0/0
ip address 50.0.0.1 255.0.0.0
no shut
exit
exit
!
show int f0/0
!

32
Step 5: Configure host

33
Step 6: Verify the connectivity (from host)

34
Step 6 Verify the connectivity (from router)

35
Static Routing

 Definition
 Design and Implement
Static Routing
 Routing Table Explained
 Class Practice

36
Static Routing
Static Routing is to manually enter the routing information into the router
• This information will remain until it is manually changed
• It does not respond to network changes
• It is tedious to set all the routing information
• It is used for some “static” routes: e.g. only one way to reach a upper layer router

37
Design and implement Static Routing

N3

S0/1/0 S0/0/0
Branch A Branch B
F0/0 F0/0
.98 .129 N2
N1 .97
4 .65 4
200.0.1.96
5 255.255.255.224 5

.66 .130

200.0.1.64 200.0.1.128
255.255.255.224 255.255.255.224

38
Static Routing
N1 would like to reach N2; thus R104 needs to know the route to R105.
Next hop will be R105-S0/0/0:
command target_Network Mask next_hop
IP route 200.0.1.128 255.255.255.224 200.0.1.98

N3

S0/1/0 S0/0/0
Branch A Branch B
F0/0 F0/0
.98 .129 N2
N1 .97
4 .65 4
200.0.1.96
5 255.255.255.224 5

.66 .130

200.0.1.64 200.0.1.128
255.255.255.224 255.255.255.224

39
Static Routing
Communication needs to be two ways. N2 needs to know how to reply to N1; thus R105 needs to know
the route to R104. Next hop will be R104-S0/1/0:
command target_Network Mask next_hop
IP route 200.0.1.64 255.255.255.224 200.0.1.97

N3

S0/1/0 S0/0/0
Branch A Branch B
F0/0 F0/0
.98 .129 N2
N1 .97
4 .65 4
200.0.1.96
5 255.255.255.224 5

.66 .130

200.0.1.64 200.0.1.128
255.255.255.224 255.255.255.224
40
Static routing implementation
Without routing, hosts T104 in N1 cannot ping hosts T105 in N2

41
Static routing implementation
Enter the static routing info in R104, can be verified that hosts in N1 still cannot
ping hosts in N2.
As N2 has no route to send message back.
IP route 200.0.1.128 255.255.255.224 200.0.1.98

42
Static routing implementation
Enter the static routing info in R105, now the two way communication shall
be enabled.
IP route 200.0.1.64 255.255.255.224 200.0.1.97
Verification, now T104 and T105 hosts can ping each other.

43
Static routing implementation
Verification, now D1 and D3 hosts can ping each other.

44
Static routing implementation
The routing info can be checked with router: show ip route

45
Routing Table Explained
The routes that start with S is the static routes
The route marked with * is the default route
The routes that start with C is the directly connected routes
Other routes are dynamic routes discovered by routing protocols
hh:mm:ss - elapsed time since the last routing table update

46
Remove Static Routing
No IP route 200.0.1.128 255.255.255.224 200.0.1.98
No IP route 200.0.1.64 255.255.255.224 200.0.1.97

N3

S0/1/0 S0/0/0
Branch A Branch B
F0/0 F0/0
.98 .129 N2
N1 .97
4 .65 4
200.0.1.96
5 255.255.255.224 5

.66 .130

200.0.1.64 200.0.1.128
255.255.255.224 255.255.255.224
47
Class Practice

192.168.5.0
192.168.4.0
255.255.255.0 .1 .1 255.255.255.0

.2 .2

.1 .1

.2
.2 .2

192.168.1.0 192.168.3.0
255.255.255.0 255.255.255.0 192.168.2.0
255.255.255.0
48
Class Practice – R104

IP route 192.168.3.0 255.255.255.0 192.168.4.1


IP route 192.168.2.0 255.255.255.0 192.168.4.1

49
Class Practice – R105

IP route 192.168.1.0 255.255.255.0 192.168.4.2


IP route 192.168.2.0 255.255.255.0 192.168.5.2

50
Class Practice – R106

IP route 192.168.1.0 255.255.255.0 192.168.5.1


IP route 192.168.3.0 255.255.255.0 192.168.5.1

51
Question?

from next week, remember to bring pen


and paper to the lectures for some
exercises

52

You might also like