Git Product home page Git Product logo

learn-network's Introduction

Udemy - The Complete Networking Fundamentals Course. Your CCNA start 2020-7

The Distance Between YOur Dreams and Reality is Called Persistance.

if you continue you will get it you will understand it

Basic Networking Terms

what is network ?

why do we have computer networks?

what's the whole point of the internet?

answer : sharing resources

now what is a resource ?

in the old days a common example of a resource would be a printer

or another example would be a file or video. you can share file resources whit USB but it's much easier just to share files using a digital transmission mechanism

1

computing device : laptop, macbook, phone, server, printer

most basic type of network

the internet is the biggest network that we have on earth today. a small network would simply consist of 2 computers.

wifi an example of using the air for transmission of data from one device to the other instead of using cable(RJ45)

a bit of networking history

internet start with 10base5 cabling

servers, clients, ports, protocols

a server is providing a service or functionality ot clients in what's called a client server model.

client is a piece of computer hardware or software that accesses a service made available by a server. the server is often on another computer system, in which case the client accesses the service by way of a network.

the whole idea of a server is to provide resources or functionality to clients

a client device such as a laptop can act as a server

now a server, will be listening on different prot numbers for different protocols.

protocol basically a set of rules used for communication between devices.

server has to listen on specific prot numbers for specific protocols.

Networking Devices Repeaters, Hubs, Switches, Routers

so in conclusion, hubs and switches are used to create networks while routers are used to connect networks.

repeaters => hubs => bridges(learns MAC addresses in software) => switch(learns MAC addresses mu ch more quickly by using hardware ASICs Application Specific Integrated Circuits)

  1. hub: repeats the signal without understanding what's going on, work on layer 1.

a wifi network or a wireless network is essentially a hub in the air

  1. switch: a switch actually reads the frames received on ethernet, so uses a MAC address table, and only forward the frames out of the correct port.and uses for local network(LAN) or vLAN(virtual local network), route from one subnet to another. and work on layer 2.

the big difference between a switch and a hub is a switch has intelligence.

so that's one of the features of switches they allow us to connect many devices in our local area network.

  1. routers which use IP addresses to route from one network to another network, layer 3.

typically little routes like(my home modem) allow us to go from our LAN onto the internet(WAN)

Firewalls

firewall in front of the router 2

firewall behind of the router 3

if i have 100 access points for manage them, they would connect to the Wireless LAN controller.


TCPIP Model

4 5

how many layers are there in networking? OSI or TCPIP Model.

people in the real world are saying the OSI model is rubbish. other people say's no OSI model is required.

you need to know both the OSI model and TCPIP model but concentrate on the TCPIP model 6

the TCPIP protocol is what we use in the real world

so now in the new version of the CCNA we have what these called hybrid model or combined model of OSI and TCPIP model ipspace

RFC

RFC allow us to agree on what protocol will be implemented by different vendors

7

8

Bits, Frames, Packets, Segments

9

on ethernet devices communicate using MAC address, and MAC addresses are burnt in address on a network interface card.

ARP resolution protocol requesting the MAC address, (so basically saying who has this IP address)

TCp packet, so in TCP before communication takes place they do three way handshake

how does one layer referred to the layer above it ?

at layer 2 on ethernet it uses a type field

when a device receives a frame at layer 2 it needs to know which protocol to use... in other words is it an IPv4 packet or is it an IPv6 packet? it's based on the type field at layer 2

The "Type" field in Ethernet II frames tells the OS what kind of data the frame carries โ€“ 0x0800 means that the frame has an IPv4 packet; there's a list of different EtherTypes.

answer

10


Binary

2^n = number of binary values

11

12

13

14

octet

15

ipv4 = 4 octet

192.168.2.16 = 8bits . 8bits . 8bits .8bits

16

IP Address Example

17


Hexadecimal

ARP is used to find the MAC address of another device in the network it's basically broadcast sent out into the network saying who has this IP address and that device will reply back with its MAC address

18

19

20

ipconfig /all in windows show MAC address

arp -a show MAC address

some cisco switches command

  1. en takes us to privilege mode
  2. show mac address-table

IP Addressing

what is an IP Address

21

a lot of web sites don't permit PING which uses ICMP so the request times out, but the DNS server resolve

nslookup just does a DNS resolution of a domain name rather than trying to ping the server

IP Characteristics

22

23

Network vs Host Portion

24

IPv4 format

25

IPv4 classes

26

Class A

27

28

29

Class B

30

31

Class C

32

33

Class D

Multicast one device has talking to a group of devices

34

Class E

Reserved classes for broadcast

35

summary

36 37 38

Directed Broadcast Address

39

CPU of every device will be interrupted to process the directed broadcast

40

Local Broadcast Address

41

Local Loopback Address

42

Private Address

Essentially a lot of the information that we're studying in networking, comes originally form RFCs

RFC1149 describe IP

RFC1948 Private IP

43

44

Link - Local Addresses

45

if you'r IP address in the range 169.254.0.0 that means the PC was not able to get an IP address via a DHCP.

Subnet Mask

a subnet mask is used to determine which part of an IP address is the network portion and which part of the address is the host portion

46 47 48 49 50

how does a device know whether another device is local or remote to itself??

51

Example

52 53

Discontiguous Network Mask

54

CIDR (Classless Inter-Domain Routing)

55 56

Notice in class A B C addresses, the subnet mask is set on the Octet Boundary

with CIDR the subnet mask can be somewhere in the middle, It doesn't have to be on the octet boundary.

57

so from 1993 CIDR is more preferable than classfull network mask.

58 59


Initial Device Configuration

switch initial configuration

Do NOT plug direct pc to a cisco switch with RJ45 cable!!

just plug with USB!!

  1. we connected a cisco switch to a computer
  2. with putty and serial connection type we connected to the switch (COM Ports)
  3. with en command go to the administrator mode
  4. erase startup-config
  5. show version
  6. configure terminal global configuration
  7. hostname <your_hostname>
  8. end take back to to enable mode
  9. copy running-config startup-config or wr save config to the disk

Router initial configuration

connect CONSOLE cable to the RS-232 of pc to the CONSOLE prot of the router

60

build a basic cisco network

another difference between switches and routers is switch interfaces by default come up generally, but router interfaces all by default disabled or shut down you need to enable those interfaces by using the no shutdown command.

config ip address in the router :

  1. en

  2. show ip int brief show interface_number

  3. conf t

  4. interface <choose_interface> <interface_number>

  5. interface GigabitEthernet 0/0/0

  6. ip address 10.1.1.1 255.255.255.0

  7. no shutdown

  8. end

  9. hostname R1

  10. end

  11. copy running-config startup-config or wr

  12. show ip interface <interface_name> <interface_number>

  13. show arp

  14. show running-config

set enable password

  1. en
  2. conf t
  3. enable password <user_password>

encrypt enable password

  1. en
  2. conf t
  3. service password-encryption

config secret password

  1. en
  2. conf t
  3. enable secret <your_secret>

secret password overwrite the enable password

telnet configuration

  1. en
  2. sh ru
  3. see the status of line vty 0 4
  4. conf t
  5. line vty 0 4
  6. login
  7. set password password <your_pass>
  8. end

config console password

  1. en
  2. conf t
  3. line console 0
  4. login
  5. password <your_pass>
  6. end

Ethernet Cabling

Straight-through Cable :

  1. connect user to switch
  2. connect router to switch or hub

61

Crossover Cable :

62

Rolled Cable :

63


IP Subnetting

Binary Method

64

Example 1

65

Example 2

66

67

68

69

Example 3

70

71

72

Quick Method

73

Example 1

74

75

76

77

78

79

80

How to Subdivide a network

why ?

81

It's not practically possible to have so many hosts on the subnet, a lot of network engineers will put a maximum of 254 hosts on a subnet, in other words they would subnet down to class C subnet

the formula to work out how many host are supported on a subnet

82

how ?

83

84

85

Question 1

86

87

88

89

90

91

we have taken 1 subnet supporting 254 hosts and change that into 16 subnets each supporting 14 hosts

Question 2

92

93

94

95

96


IPv4 Subnetting Cheat Sheet

IPv4 Subnetting Cheat Sheet


Cabling and Packet Flows

97

Types of Communication

98

OSI Model Overview

99

Ethernet Born - 1970s

Bus Topology

in the original ethernet implementation the network architecture that was use was a bus topology

in a bus topology, each devices connected to a single cable

100

10base2

101

MAC Address

102

103

Broadcast domains, UTP & Cross Over Cables

10baseT

104

Unshielded Twisted Pair (UTP)

105

106

Straight Through Cables

107

straight Through Cables are used to in situations where you connect a PC to a switch or a PC to a bridge or PC to a hub

Cross Over Cable

108

Which cable should you use and cable categories

in the past you'd have to know when to use a straight through or crossover cable, however today automatic crossover or auto MDX is widely used or to MDX was introduced in 1998 and it

Auto MDI/MDIX

109

Cable Categories

110 111

SFPs, DAC, Roll Over cable and how devices operate, hubs

Direct Attachment Cable (DAC) Copper Twinax

112

Roll Over Cable

113

Hub

a hub is a layer one device in the OSI model and you would use a cat 5 unshielded twisted pair cable with an RJ45 connector to connect your laptop to a port on a hub

wireless operates in the same way like a physical hub would

a hub is physical layer device it's not intelligent and does not understand the fames going through it, it's basically multi port repeater and it will amplify or repeat the frames that it receives on one port out of all other ports.

114

Hub vs 10baseT

115

How does a Hub forward traffic

so in this example, let's assume that A is sending traffic to C.

so the source addres of the frame is A nad the destination address of the frame is C.

A sends that frame to the hub.

now because a hub is a multi port repeater in other words it's simply a repeater with multiple ports and it has no understanding of the traffic it receives, it will simply amplify the signal and send the traffic or frames out of all ports.

so every device in this topology wil receive the frame sent from A to C.

the network interface of B and D will receive the frame and read the destination MAC Address is C therefore the frame is not destined to themselves and the network interface cards will drop the frame.

116

the way the network is physically cabled is not necessarily the way the network is going to operate

117

what is a bridge

118

Wireless networks act like hubs

so overtime hubs wre replaces by bridges and bridges in turn have been replaces by switches

119

Switch Vs Bridge

120

Switch (layer2 - layer3)

think of the switch as a bridge but it's much more powerful and quicker

121

Example

122

half Duplex and full Duplex

123

124

125

Router (layer 3)

Routers do not make routing decisions based on MAC addresses but Router use IP addresses when determining out of which interface is traffic should be sent.

126

Routers don't populate their routing tables using IP addresses but Router populate the routing tables with network addresses. and they make their routing decision based on the network address, rather than individual IP addresses.

127

Example.

128

host A want ping 10.1.1.2

IP is a layer 3 technology - MAC address are used at layer 2
so PC A needs to have a mapping between the layer 3 IP address
and the layer 2 MAC address.
that's because ethernet is used in this environment
and the packet needs to be encapsulated at layer 2 and sent into the wire.
so in Ethernet a MAC address needs to be added at layer 2.
so this point PC A doesn't know the MAC address associated with IP address 10.1.1.2.
so before A can send the traffic onto the network segment it needs to know the MAC address associated with IP address 10.1.1.2.

sho how is PC A going to learn the MAC address of PC C ?

it does this by using a protocol called ARP(Address Resolution Protocol).
arp -a local ARP cache.
arp -d delete local ARP cache.
the first thing PC A does is check its local ARP cache.
if does'nt find PC A send ARP broadcast and say who has IP address 10.1.1.2 and that message is called an ARP Request Message.

so when sending traffic from 1 subnet to another subnet the layer 3 headers contain the source host IP address and the destination host IP address. But at layer 2 the source MAC address is he local host and the destination MAC address is the local ROUTER(default gateway)

129


Duplex and Speed Mismatch Demo

I will come back for you later 19-1


What is a loopback

What is the purpose of the loopback interfaces?

the difference between a physical interface and a loopback interface is a loopback interface is a logical interface on a router and you can create many of these.


TCP UDP

TCP/IP Transport Layer (Layer 4 of OSI Model)

130

UDP

131 135 136

TCP

132 137 138

socket

133

134

Application

139

How Layers Connect Together

layer 2 to layer 3 (determine witch protocol should use in layer3 ipv4 or ipv6)

140

layer 3 to layer 4 (determine witch protocol should use in layer4 tcp or udp)

141

layer 4 to layer 5 (determine witch protocol should use in layer5 )

142

Port Number

iana port numbers

143 144 145 146

TCP 3 way handshake

SYN = 700 => client says my sequence number is 700. sequence number is a number which indicate the order of packets that sends to to server.

  1. client send the SYN=700 to the server , and tell the server, my sequence number is 700.
  2. server send SYN=200/ACK=700+(size of received data)701 to the client and says hey client I Acknowledge your request and my Sequence number is 200.
  3. client send ACK=200+1 to the server.

TCP Acknowledgement

147


wireShark

24-1

learn-network's People

Contributors

pedramaghasian avatar

Stargazers

Farhad Azad Ehyaei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.