if you continue you will get it you will understand it
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
computing device : laptop, macbook, phone, server, printer
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)
internet start with 10base5 cabling
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.
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)
- 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
- 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.
- 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)
firewall in front of the router
if i have 100 access points for manage them, they would connect to the Wireless LAN controller.
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
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 allow us to agree on what protocol will be implemented by different vendors
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.
2^n = number of binary values
octet
ipv4 = 4 octet
192.168.2.16 = 8bits . 8bits . 8bits .8bits
IP Address Example
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
ipconfig /all
in windows show MAC address
arp -a
show MAC address
some cisco switches command
en
takes us to privilege modeshow mac address-table
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
IPv4 classes
Class A
Class B
Class C
Class D
Multicast one device has talking to a group of devices
Class E
Reserved classes for broadcast
CPU of every device will be interrupted to process the directed broadcast
Essentially a lot of the information that we're studying in networking, comes originally form RFCs
RFC1149 describe IP
RFC1948 Private IP
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.
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
how does a device know whether another device is local or remote to itself??
Example
Discontiguous Network Mask
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.
so from 1993 CIDR is more preferable than classfull network mask.
Do NOT plug direct pc to a cisco switch with RJ45 cable!!
just plug with USB!!
- we connected a cisco switch to a computer
- with putty and serial connection type we connected to the switch (COM Ports)
- with
en
command go to the administrator mode erase startup-config
show version
configure terminal
global configurationhostname <your_hostname>
end
take back to to enable modecopy running-config startup-config
orwr
save config to the disk
connect CONSOLE cable to the RS-232 of pc to the CONSOLE prot of the router
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 :
-
en
-
show ip int brief
show interface_number -
conf t
-
interface <choose_interface> <interface_number>
-
interface GigabitEthernet 0/0/0
-
ip address 10.1.1.1 255.255.255.0
-
no shutdown
-
end
-
hostname R1
-
end
-
copy running-config startup-config
orwr
-
show ip interface <interface_name> <interface_number>
-
show arp
-
show running-config
set enable password
en
conf t
enable password <user_password>
encrypt enable password
en
conf t
service password-encryption
config secret password
en
conf t
enable secret <your_secret>
telnet configuration
en
sh ru
- see the status of line vty 0 4
conf t
line vty 0 4
login
- set password
password <your_pass>
end
config console password
en
conf t
line console 0
login
password <your_pass>
end
- connect user to switch
- connect router to switch or hub
Example 1
Example 2
Example 3
Example 1
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
Question 1
we have taken 1 subnet supporting 254 hosts and change that into 16 subnets each supporting 14 hosts
Question 2
Types of Communication
OSI Model Overview
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
10base2
MAC Address
10baseT
Unshielded Twisted Pair (UTP)
Straight Through Cables
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
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
Cable Categories
Direct Attachment Cable (DAC) Copper Twinax
Roll Over Cable
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.
Hub vs 10baseT
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.
the way the network is physically cabled is not necessarily the way the network is going to operate
Wireless networks act like hubs
so overtime hubs wre replaces by bridges and bridges in turn have been replaces by switches
Switch Vs Bridge
think of the switch as a bridge but it's much more powerful and quicker
Example
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.
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.
Example.
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)
I will come back for you later 19-1
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.
UDP
TCP
socket
Application
layer 2 to layer 3 (determine witch protocol should use in layer3 ipv4 or ipv6)
layer 3 to layer 4 (determine witch protocol should use in layer4 tcp or udp)
layer 4 to layer 5 (determine witch protocol should use in layer5 )
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.
- client send the SYN=700 to the server , and tell the server, my sequence number is 700.
- 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.
- client send ACK=200+1 to the server.
TCP Acknowledgement
24-1