1 - Network Fundamentals
1 - Network Fundamentals
Networking
Network Systems
• Network
• Network Topology
• Cabling
• What’s network
• Physical types of network:
• LAN (Local Area Network).
• WAN (Wide Area Network).
• Ring
• Mesh
• Star
Bus Topology
• All devices receive the signal.
Ring Topology
Full-Mesh Topology
Partial-Mesh Topology
Star Topology
types of cables & Connectors
• Copper cable
• Coaxial
• Twisted Pair
• Fiber cable
25
Fiber Optic Connectors
26
Access Methods
• Data in Medium like trains in railways
• Access Method Types:
• Carrier Sense Multiple Access with Collision Detection CSMA/CD
• Token-Passing
CSMA/CD
Casting types
• Unicast : means send data for one of all receivers.
0101110101001000010 Physical
Bits
De-encapsulating Data
Application
Presentation
Upper Layer Data
Session
Physical
0101110101001000010
7- Application Layer
• HTTP : Browsing protocol
• FTP : File Transfer Protocol
• TFTP : Trivial FTP
• Telnet : Remote access protocol
• SMTP : Simple Mail Transfer protocol
• SNMP : Simple Network Management Protocol
6- presentation layer
• Format of data
• Flow control
• Error recovery
Windowing
Sender Receiver
Windowing
Sender Receiver
Window size = 3
Send 1
Window size = 3
Send 2
Window size = 3
Send 3
Windowing
Sender Receiver
Window size = 3
Send 1
Window size = 3
Send 2 Packet 3 is
Window size = 3 Dropped
Send 3
ACK 3
Window size = 2
Windowing
Sender
Receiver
Window size = 3
Send 1
Window size = 3
Send 2
Packet 3 is
Window size = 3 Dropped
Send 3
ACK 3
Window size = 2
Window size = 2
Send 3
Window size =2
Send 4
Windowing
Sender Receiver
Window size = 3
Send 1
Window size = 3
Send 2 Packet 3 is
Dropped
Window size = 3
Send 3
ACK 3
Window size = 2
Window size = 2
Send 3
Window size = 2
Send 4
ACK 5
Window size = 2
Transport Layer Overview
Transmission
Transmission Control
Control Connection-Oriented
Application Protocol
Protocol (TCP)
(TCP)
Data Link
Physical
TCP Three Way Handshake/Open
Connection Host A Host B
1 Send SYN
(seq=100 ctl=SYN)
SYN received
2
Send SYN, ACK
SYN received (seq=300 ack=101)
3 Established
(seq=101 ack=301)
* Popular TCP/UDP application:
Port Application
80 HTTP
443 HTTPS
21 FTP TCP
25 SMTP
23 telnet
53 DNS
67 DHCP
UDP
161 SNMP
69 TFTP
TCP Port Numbers
Source
Source Dest.
Dest. …
…
Port
Port Port
Port
Telnet Z
Host A Host Z
I just
sent #10.
I just
sent #10. I just got #10,
now I need #11.
I just
sent #10.
I just got #10,
now I need #11.
1028
1028 23
23 11
11 22
TCP Sequence and
Acknowledgment Numbers
Source
Source Dest.
Dest. Sequence
Sequence Acknowledgement
Acknowledgement
Port
Port Port
Port …
…
## ##
I just
sent #11.
I just got #11,
now I need #12
1028
1028 23
23 11
11 22
Source Dest. Seq. Ack.
23
23 1028
1028 22 12
12
TCP Segment Format
Options (0 or 32 if any)
Data (varies)
UDP Segment Format
Physical
* ICMP (Internet Control Message Protocol):
- To provide information message concerning routing of IP datagram.
* Ping command:
- To test basic IP connectivity.
- Uses the ICMP sending called an ICMP echo request to another IP address.
- The computer with IP address should replay with an ICMP echo replay.
Error message:
- If the Router receives a packet TTL=1, must send a time exceeded error.
The tracert Utility
• The TCP/IP Trace Route (tracert) command-line utility will show you
every router interface a TCP/IP packet passes through on its way to a
destination.
Address Resolution Protocol
172.16.3.1 172.16.3.2
IP:
IP: 172.16.3.2
172.16.3.2 == ???
???
MAC address : hardware address
bit 48
bit 24 bit 24
( vendor) IEEE
Address Resolution Protocol
172.16.3.1 172.16.3.2
IP:
IP: 172.16.3.2
172.16.3.2 == ???
???
Address Resolution Protocol
172.16.3.1 172.16.3.2
IP:
IP: 172.16.3.2
172.16.3.2 == ???
???
IP:
IP: 172.16.3.2
172.16.3.2
Ethernet:
Ethernet: 0800.0020.1111
0800.0020.1111
Address Resolution Protocol
172.16.3.1 172.16.3.2
• Map IP Ethernet
IP:
IP: 172.16.3.2
172.16.3.2 == ???
???
• Local ARP IP:
IP: 172.16.3.2
172.16.3.2
Ethernet:
Ethernet: 0800.0020.1111
0800.0020.1111
Reverse ARP
What is my
IP address?
Ethernet:
Ethernet: 0800.0020.1111
0800.0020.1111 IP
IP == ???
???
Reverse ARP
I heard that
broadcast.
What is my
Your IP address
IP address?
is 172.16.3.25.
Ethernet:
Ethernet: 0800.0020.1111
0800.0020.1111 IP
IP == ???
???
Reverse ARP
I heard that
broadcast.
What is my
Your IP address
IP address?
is 172.16.3.25.
Ethernet:
Ethernet: 0800.0020.1111
0800.0020.1111 IP
IP == ???
???
Ethernet:
Ethernet: 0800.0020.1111
0800.0020.1111
IP:
IP: 172.16.3.25
172.16.3.25
Reverse ARP
I heard that
broadcast.
What is my
Your IP address
IP address?
is 172.16.3.25.
• Map Ethernet IP
Ethernet:
Ethernet: 0800.0020.1111
0800.0020.1111 IP
IP == ???
???
Ethernet:
Ethernet: 0800.0020.1111
0800.0020.1111
IP:
IP: 172.16.3.25
172.16.3.25
ARP
• Address Resolution Protocol (ARP)
• it is used to translate TCP/IP addresses to MAC (media access control)
addresses using broadcasts.
• The ARP table contains two kinds of entries:
• Dynamic
• Static
• Dynamic ARP table entries are created whenever the Windows TCP/IP
stack makes an ARP request and the MAC address is not found in the
ARP table. The ARP request is broadcast on the local segment. When the
MAC address of the requested IP address is found, that information is
added to the ARP table.
ARP Switches
• ARP -a
• You’ll see something similar to the following:
• ARP -s [IP Address] [MAC Address]
• ARP -s 204.153.163.5 00-a0-c0-ab-c3-11
• ARP –d
• ARP -d 204.153.163.5
• This deletes the entry from the ARP table in memory.
A B
1- DHCP Discover:
Src. MAC Dst. MAC Src. IP Dst. IP data
B A DHCP IP 0.0.0.0 IP IS
3- DHCP Request Message:
A B 0.0.0.0 DHCP IP OK
4- DHCP Acknowledgment:
B A DHCP IP 0.0.0.0 IP IS
DNS
(Domain Name System): Resolve known name to
unknown IP.
2- Data link
• Data Frame Format
• Arbitration : find the best time to send the data ( CSMA/CD & token)
• Error detection
• 1- parity check : but very weak
• 2-CRC : Depend on mathematical equation
Physical Layer
• Converts Data To Signals
• Defines network Media type
• Defines cables types
• The physical component must be supported by Data-Link Layer
Network Device Domains
Hub Bridge Switch Router
Collision Domains:
1 4 4 4
Broadcast Domains:
1 1 1 4
Question
Broadcast ?? collision ??
A B C D
A B C D
Question
Broadcast ?? collision ??
A B C D
A B C D
Question
Broadcast ?? collision ??
A B C D
A B C D
Question
Broadcast ?? collision ??
C B A
C B A
Ethernet Switches and Bridges
• Address learning
• Forward/filter decision
MAC Address Table