Netzwerkgrundlagen - Von Ethernet bis IP

Maximilan Wilhelm
Maximilan WilhelmLinux Networking, Automation & IPv6 Evangelist
Netzwerkgrundlagen - Von Ethernet bis IP
FrOSCon 13 Network Track
Falk Stern, Maximilian Wilhelm
1 / 33
Agenda
1. Who's who
2. Models
3. Ethernet
4. IPv4
5. Linux Hands-on
2 / 33
Who's who Falk Stern
Full Stack Infrastructure Engineer
IPv6 fanboy
Runs his own Kubernetes cluster in his basement
Consultant @ Profi Engineering Systems AG
Contact
@wrf42
falk@fourecks.de
3 / 33
Who's who Maximilian Wilhelm
Networker
OpenSource Hacker
Fanboy of
(Debian) Linux
ifupdown2
Occupation:
By day: Senior Infrastructure Architect, Uni Paderborn
By night: Infrastructure Archmage, Freifunk Hochstift
In between: Freelance Solution Architect for hire
Contact
@BarbarossaTM
max@sdn.clinic
4 / 33
Who's who
Models
Layer models - ISO/OSI, TCP/IP & Hybrid
5 / 33
Who's who
Models
Layer models - ISO/OSI, TCP/IP & Hybrid
Physical
Wires, Wireless - 802.3 & 802.11 (Bit)
Data Link
Addressing stations on the same physical medium (Ethernet MAC) (Frame)
Network
Adressing stations somewhere in the entire network (IPv4, IPv6) (Packet)
Transport
How to transport data? (Datagram, Segment)
Session, Presentation, Application
Which data to transport? (SSH, IRC, HTTP, etc.)
6 / 33
Who's who
Models
Ethernet
Ethernet
7 / 33
Who's who
Models
Ethernet
Hardware - What does it look like?
Source: Wikimedia commons
8 / 33
Who's who
Models
Ethernet
Ethernet
Developed between 1973 and 1974 at Xerox
Inspired by ALOHAnet, the Packet Radio Network on Hawaii
At first available with 2,94 Mbps, 10 Mbps available commercially since 1980
Further development lead to IEEE standard 802.3 in 1983
CSMA/CD - "Carrier Sense, Multiple Access, Collision Detect"
Ethernet today:
Common access port speed: 1 Gbit/s
Common uplink/server interfaces speed: 10 - 40 Gbit/s
Up to 400-Gbit/s available commercially
Interfaces for copper or multi-mode / single-mode fiber
Preamble SFD
Source
MAC
Address
Destination
MAC
Address
EtherType FCSPayload
Source: Wikimedia Commons
9 / 33
Who's who
Models
Ethernet
Ethernet Technology
Repeater
Maximum Segmentlength in on network segment around 100m
Repeater amplify and repeat signals
Extend broadcast domains
Extend collision domains
Bridges
Extend broadcast domains
Limit collision domains
Important Rule: Frames must not be send out on port where they were received
10 / 33
Who's who
Models
Ethernet
Ethernet Devices
Hubs
Repeater with many ports
Switches
Bridges with many ports
Three possible actions to happen with any frame:
Forward
Replicate
Drop
11 / 33
Who's who
Models
Ethernet
Addresses
Format: AA:BB:CC:DD:EE:FF
Identify stations on the same physical medium
Should to unique (on the medium)
1st octet 2nd octet 3rd octet 4th octet 5th octet 6th octet
6 octets
or
Organisationally Unique
Identifier (OUI)
Network Interface Controller
(NIC) Specific
3 octets 3 octets
b7 b6 b5 b4 b3 b2 b1 b0
8 bits
0:
1:
unicast
multicast
0:
1:
globally unique (OUI enforced)
locally administered
Source: Wikipedia Commons
12 / 33
Who's who
Models
Ethernet
Linux command line example
$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue
state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
state DOWN mode DEFAULT group default qlen 1000
link/ether 70:5a:0f:cf:21:f3 brd ff:ff:ff:ff:ff:ff
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq
state UP mode DORMANT group default qlen 1000
link/ether 64:80:99:cf:66:6f brd ff:ff:ff:ff:ff:ff
13 / 33
Who's who
Models
Ethernet
Spanning Tree
Protocol for loop prevention within ethernet networks
Create logical tree of network topology based on BPDUs
Will block connections which will produce loops
Only deactivate STP if you really know better
Seriously!
14 / 33
Who's who
Models
Ethernet
IPv4
15 / 33
Who's who
Models
Ethernet
IPv4
IPv4 Adresses
Identify stations within and beyond subnets
Up to - but not limited to - the Internet
32bit long
Composed of 4 octets
127.0.0.1
94.45.240.1
Subdived into network and host part
What is now known as the Internet started as a research project in the 1970s to
design and develop a set of protocols that could be used with many different
network technologies to provide a seamless, end- to-end facility for
interconnecting a diverse set of end systems.
Source: RFC4632, Section 2
16 / 33
Who's who
Models
Ethernet
IPv4
Network Classes (historical!)
Deprecated since 1993 (RFC1519)!!1!
Long live CIDR / VLSM
Correct and complete definition given for historical attribution only!
DO NOT USE IN REAL LIFE ANYMORE! SRSLY!
Class Binary Prefix IP Space Default Mask
A 0... 0.0.0.0 - 127.255.255.255 /8
B 10.. 128.0.0.0 - 191.255.255.255 /16
C 11.. 192.0.0.0 - 223.255.255.255 /24
D 1110 224.0.0.0 - 239.255.255.255
E 1111 240.0.0.0 - 255.255.255.255
17 / 33
Who's who
Models
Ethernet
IPv4
Subnetting - CIDR / VLSM
Classless InterDomain Routing
Variable Length Subnet Mask
Introduced in 1993, RFC4632 (original RFC1519)
Prefix Notation -> Number of bits in network part of address
255.255.255.0 == 24 Bit netmask == /24
18 / 33
Who's who
Models
Ethernet
IPv4
Pre xes to know/ Private stu
Loopback
127.0.0.0/8
RFC1918 - Private Address Space
10.0.0.0/8, 172.16.0.0/12 und 192.168.0.0/16
RFC3927 - APIPA / Link-Local
169.254.0.0/16
RFC6598 - Shared Address Space (CGN)
100.64.0.0/10
RFC5737 - Documentation prefixes
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24
RFC8190 - Special-Purpose IP Address Registries
Complete list of special prefixes
19 / 33
Who's who
Models
Ethernet
IPv4
ARP - Address Resolution Protocol
Glue between Ethernet and IP
Simple protocol to resolve MAC address of IP peer
Two messages types
who-has
is-at
A B
ARP WHO-HAS 192.168.1.1
192.168.1.1 IS-AT C0:FF:EE:BA:BE:01
A B
20 / 33
Who's who
Models
Ethernet
IPv4
Routing
Every device speaking IP has a routing table
German translation according to IBM: "Leitwegtabelle"
Packets are forwarded according to longest prefix match
Default Gateway or Gateway of last resort used if no entry matches
Hot Potato principle
Packets forwarded to next hop w/o knowledge of their routing table
Asymmetric routing
Path to destination and return path don't have to be identical
Routing table of your laptop right now:
Prefix Iface / Next Hop
94.45.240.0/20 wlan0
0.0.0.0/0 94.45.240.1
21 / 33
Who's who
Models
Ethernet
IPv4
Source Address Selection
With every routing decision for a locally originated connection a source address is
selected based on the routing table.
Usually the (primary) IP configured on the outgoing interface
May be explicitly set to any IP
For example IP on loopback interface
Prefix Iface / Next Hop Src Address
94.45.240.0/20 wlan0 94.45.242.23
192.168.0.0/24 eth0 192.168.0.42
0.0.0.0/0 94.45.240.1
22 / 33
Who's who
Models
Ethernet
IPv4
MTU/MSS
Maximum Transmission Unit
Maximum size of a frame
Usually 1500 Bytes in Ethernet networks
Usually >= 9000 Bytes in service provider backbones (Jumbo Frames)
Maximum Segment Size
Maximum size of a segment which fits into a TCP packet
MTU - 60 Bytes
23 / 33
Who's who
Models
Ethernet
IPv4
Where to get IP addresses?
24 / 33
Who's who
Models
Ethernet
IPv4
IP delegation hierarchy
Source: Obtaining IPv4 -
Andrew de la Haye - RIPE Regional Meeting 2014
25 / 33
Who's who
Models
Ethernet
IPv4
Linux
Network con guration on Linux
26 / 33
Who's who
Models
Ethernet
IPv4
Linux
Network con guration on Linux
R.I.P. ifconfig
R.I.P. route
R.I.P. arp
R.I.P. vlan
R.I.P. brctl
R.I.P. tunctl
<Moment of Silence/>
Long live iproute2
27 / 33
Who's who
Models
Ethernet
IPv4
Linux
iproute - Networkers Swiss Army Nife
Functions segregated into sub commands
Lazy admin friendly: Commands can be shortend
ip link
Layer2 configuration
Vlans
Bridges
ip addr
Layer3 configuration / IP addresses
ip route
Routing
ip neigh
ARP / ND
28 / 33
Who's who
Models
Ethernet
IPv4
Linux
ip link
ip link set { DEVICE | dev DEVICE } [ { up | down } ]
[ promisc { on | off } ]
[ name NEWNAME ]
[ address LLADDR ]
[ mtu MTU ]
[ master DEVICE ]
[ nomaster ]
[...]
ip link show [ DEVICE ]
29 / 33
Who's who
Models
Ethernet
IPv4
Linux
ip addr
Usage: ip addr {add|change|replace} IFADDR dev STRING [ LIFETIME ] [...]
ip addr del IFADDR dev STRING
ip addr {show|flush} [ dev STRING ] [ scope SCOPE-ID ]
[ to PREFIX ] [ FLAG-LIST ] [ label PATTERN ]
IFADDR := PREFIX | ADDR peer PREFIX
[ broadcast ADDR ] [ anycast ADDR ]
[ label STRING ] [ scope SCOPE-ID ]
SCOPE-ID := [ host | link | global | NUMBER ]
[...]
30 / 33
Who's who
Models
Ethernet
IPv4
Linux
ip route
Usage: ip route { list | flush } SELECTOR
ip route { add | del | change | append | replace } ROUTE
SELECTOR := [ root PREFIX ] [ match PREFIX ] [ exact PREFIX ]
[ table TABLE_ID ] [ proto RTPROTO ] [ type TYPE ] [ scope SCOPE ]
ROUTE := NODE_SPEC [ INFO_SPEC ]
NODE_SPEC := [ TYPE ] PREFIX [ tos TOS ]
[ table TABLE_ID ] [ proto RTPROTO ] [ metric METRIC ]
INFO_SPEC := NH OPTIONS FLAGS [ nexthop NH ]...
NH := [ via ADDRESS ] [ dev STRING ] [ weight NUMBER ] NHFLAGS
[...]
31 / 33
Who's who
Models
Ethernet
IPv4
Linux
ip neigh
Usage: ip neigh { add | del | change | replace }
{ ADDR [ lladdr LLADDR ] [ nud STATE ] | proxy ADDR } [ dev DEV ]
ip neigh { show | flush } [ proxy ] [ to PREFIX ] [ dev DEV ] [ nud STATE ]
[ vrf NAME ]
STATE := { permanent | noarp | stale | reachable | none |
incomplete | delay | probe | failed }
32 / 33
Who's who
Models
Ethernet
IPv4
Linux
Questions
Questions?
33 / 33
1 of 33

Recommended

Anycast all the things by
Anycast all the thingsAnycast all the things
Anycast all the thingsMaximilan Wilhelm
954 views35 slides
Nokia L3 VPN Configuration Guide by
Nokia L3 VPN Configuration GuideNokia L3 VPN Configuration Guide
Nokia L3 VPN Configuration GuideAbel Saduwa
483 views133 slides
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38] by
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]APNIC
10.5K views54 slides
Luận văn: Hiện trạng môi trường nước của đảo Phú Quốc, HOT by
Luận văn: Hiện trạng môi trường nước của đảo Phú Quốc, HOTLuận văn: Hiện trạng môi trường nước của đảo Phú Quốc, HOT
Luận văn: Hiện trạng môi trường nước của đảo Phú Quốc, HOTDịch vụ viết bài trọn gói ZALO 0909232620
1.6K views68 slides
Đề Thi Trắc Nghiệm CCNA Full by
Đề Thi Trắc Nghiệm CCNA Full Đề Thi Trắc Nghiệm CCNA Full
Đề Thi Trắc Nghiệm CCNA Full nataliej4
103 views90 slides
TIAD 2016 : Network automation with Ansible and OpenConfig/YANG by
TIAD 2016 : Network automation with Ansible and OpenConfig/YANGTIAD 2016 : Network automation with Ansible and OpenConfig/YANG
TIAD 2016 : Network automation with Ansible and OpenConfig/YANGThe Incredible Automation Day
3.4K views18 slides

More Related Content

What's hot

Link Aggregation Group - LACP by
Link Aggregation Group - LACPLink Aggregation Group - LACP
Link Aggregation Group - LACPPLVision
2.7K views10 slides
TÀI LIỆU VỀ HỆ THỐNG MẠNG INTERNET AON/ GPON by
TÀI LIỆU VỀ HỆ THỐNG MẠNG INTERNET AON/ GPONTÀI LIỆU VỀ HỆ THỐNG MẠNG INTERNET AON/ GPON
TÀI LIỆU VỀ HỆ THỐNG MẠNG INTERNET AON/ GPONSPKT
4.7K views119 slides
OSPF v3 by
OSPF v3OSPF v3
OSPF v3Irsandi Hasan
2.7K views22 slides
Juniper policy based filter based forwarding by
Juniper policy based filter based forwardingJuniper policy based filter based forwarding
Juniper policy based filter based forwardingMars Chen
22.7K views9 slides
Tiểu luận môn quản trị chiến lược tại công ty du lịch vietravel by
Tiểu luận môn quản trị chiến lược tại công ty du lịch vietravelTiểu luận môn quản trị chiến lược tại công ty du lịch vietravel
Tiểu luận môn quản trị chiến lược tại công ty du lịch vietravelViết Thuê Khóa Luận _ ZALO 0917.193.864 default
182 views27 slides
Mpls by
MplsMpls
Mplsarbhatawdekar
1.4K views27 slides

What's hot(7)

Link Aggregation Group - LACP by PLVision
Link Aggregation Group - LACPLink Aggregation Group - LACP
Link Aggregation Group - LACP
PLVision2.7K views
TÀI LIỆU VỀ HỆ THỐNG MẠNG INTERNET AON/ GPON by SPKT
TÀI LIỆU VỀ HỆ THỐNG MẠNG INTERNET AON/ GPONTÀI LIỆU VỀ HỆ THỐNG MẠNG INTERNET AON/ GPON
TÀI LIỆU VỀ HỆ THỐNG MẠNG INTERNET AON/ GPON
SPKT4.7K views
Juniper policy based filter based forwarding by Mars Chen
Juniper policy based filter based forwardingJuniper policy based filter based forwarding
Juniper policy based filter based forwarding
Mars Chen22.7K views
Operationalizing VRF in the Data Center by Cumulus Networks
Operationalizing VRF in the Data CenterOperationalizing VRF in the Data Center
Operationalizing VRF in the Data Center
Cumulus Networks6.1K views

Similar to Netzwerkgrundlagen - Von Ethernet bis IP

Dynamische Routingprotokolle Aufzucht und Pflege - OSPF by
Dynamische Routingprotokolle Aufzucht und Pflege - OSPFDynamische Routingprotokolle Aufzucht und Pflege - OSPF
Dynamische Routingprotokolle Aufzucht und Pflege - OSPFMaximilan Wilhelm
1.2K views39 slides
Ethernet 802.3.pptx by
Ethernet 802.3.pptxEthernet 802.3.pptx
Ethernet 802.3.pptxTanveerAthar1
14 views44 slides
Networking basics by
Networking basicsNetworking basics
Networking basicsSridhar Baithi
684 views60 slides
Introduction to tcp ip linux networking by
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networkingSreenatha Reddy K R
1.5K views36 slides
Training Day Slides by
Training Day SlidesTraining Day Slides
Training Day Slidesadam_merritt
690 views43 slides
Network.pptx by
Network.pptxNetwork.pptx
Network.pptxSAMANTHACARDOSO13
8 views56 slides

Similar to Netzwerkgrundlagen - Von Ethernet bis IP(20)

Dynamische Routingprotokolle Aufzucht und Pflege - OSPF by Maximilan Wilhelm
Dynamische Routingprotokolle Aufzucht und Pflege - OSPFDynamische Routingprotokolle Aufzucht und Pflege - OSPF
Dynamische Routingprotokolle Aufzucht und Pflege - OSPF
Maximilan Wilhelm1.2K views
Your app lives on the network - networking for web developers by Wim Godden
Your app lives on the network - networking for web developersYour app lives on the network - networking for web developers
Your app lives on the network - networking for web developers
Wim Godden548 views
16.) layer 3 (basic tcp ip routing) by Jeff Green
16.) layer 3 (basic tcp ip routing)16.) layer 3 (basic tcp ip routing)
16.) layer 3 (basic tcp ip routing)
Jeff Green510 views
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack by Maximilan Wilhelm
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-NetzwerkstackL2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
Maximilan Wilhelm5.2K views
Zdalna komunikacja sieciowa - zagadnienia sieciowe by Agnieszka Kuba
Zdalna komunikacja sieciowa - zagadnienia sieciowe Zdalna komunikacja sieciowa - zagadnienia sieciowe
Zdalna komunikacja sieciowa - zagadnienia sieciowe
Agnieszka Kuba147 views

More from Maximilan Wilhelm

This is the way - Holistic (Network) Automation by
This is the way - Holistic (Network) AutomationThis is the way - Holistic (Network) Automation
This is the way - Holistic (Network) AutomationMaximilan Wilhelm
17 views27 slides
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca... by
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...Maximilan Wilhelm
994 views45 slides
Building your own CGN boxes with Linux by
Building your own CGN boxes with LinuxBuilding your own CGN boxes with Linux
Building your own CGN boxes with LinuxMaximilan Wilhelm
428 views27 slides
Contemporary network configuration for linux - ifupdown-ng by
Contemporary network configuration for linux - ifupdown-ngContemporary network configuration for linux - ifupdown-ng
Contemporary network configuration for linux - ifupdown-ngMaximilan Wilhelm
235 views18 slides
Angewandte Netzwerkgrundlagen reloaded - von Layer 1 bis 3 by
Angewandte Netzwerkgrundlagen reloaded - von Layer 1 bis 3Angewandte Netzwerkgrundlagen reloaded - von Layer 1 bis 3
Angewandte Netzwerkgrundlagen reloaded - von Layer 1 bis 3Maximilan Wilhelm
464 views64 slides
Intent driven, fully automated deployment of anycasted load balancers with ha... by
Intent driven, fully automated deployment of anycasted load balancers with ha...Intent driven, fully automated deployment of anycasted load balancers with ha...
Intent driven, fully automated deployment of anycasted load balancers with ha...Maximilan Wilhelm
576 views24 slides

More from Maximilan Wilhelm(16)

This is the way - Holistic (Network) Automation by Maximilan Wilhelm
This is the way - Holistic (Network) AutomationThis is the way - Holistic (Network) Automation
This is the way - Holistic (Network) Automation
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca... by Maximilan Wilhelm
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
Maximilan Wilhelm994 views
Contemporary network configuration for linux - ifupdown-ng by Maximilan Wilhelm
Contemporary network configuration for linux - ifupdown-ngContemporary network configuration for linux - ifupdown-ng
Contemporary network configuration for linux - ifupdown-ng
Maximilan Wilhelm235 views
Angewandte Netzwerkgrundlagen reloaded - von Layer 1 bis 3 by Maximilan Wilhelm
Angewandte Netzwerkgrundlagen reloaded - von Layer 1 bis 3Angewandte Netzwerkgrundlagen reloaded - von Layer 1 bis 3
Angewandte Netzwerkgrundlagen reloaded - von Layer 1 bis 3
Maximilan Wilhelm464 views
Intent driven, fully automated deployment of anycasted load balancers with ha... by Maximilan Wilhelm
Intent driven, fully automated deployment of anycasted load balancers with ha...Intent driven, fully automated deployment of anycasted load balancers with ha...
Intent driven, fully automated deployment of anycasted load balancers with ha...
Maximilan Wilhelm576 views
Wie baue ich ein Freifunkbackbone - Was wir in den letzten 5 Jahren gelernt h... by Maximilan Wilhelm
Wie baue ich ein Freifunkbackbone - Was wir in den letzten 5 Jahren gelernt h...Wie baue ich ein Freifunkbackbone - Was wir in den letzten 5 Jahren gelernt h...
Wie baue ich ein Freifunkbackbone - Was wir in den letzten 5 Jahren gelernt h...
Best Current Operational Practices - Dos, Don’ts and lessons learned by Maximilan Wilhelm
Best Current Operational Practices - Dos, Don’ts and lessons learnedBest Current Operational Practices - Dos, Don’ts and lessons learned
Best Current Operational Practices - Dos, Don’ts and lessons learned
Maximilan Wilhelm561 views
Overlays & IP-Fabrics - viele Wege führen nach Rom und warum Layer2 keine Lös... by Maximilan Wilhelm
Overlays & IP-Fabrics - viele Wege führen nach Rom und warum Layer2 keine Lös...Overlays & IP-Fabrics - viele Wege führen nach Rom und warum Layer2 keine Lös...
Overlays & IP-Fabrics - viele Wege führen nach Rom und warum Layer2 keine Lös...
Maximilan Wilhelm430 views
Dynamische Routingprotokolle Aufzucht und Pflege - BGP by Maximilan Wilhelm
Dynamische Routingprotokolle Aufzucht und Pflege - BGPDynamische Routingprotokolle Aufzucht und Pflege - BGP
Dynamische Routingprotokolle Aufzucht und Pflege - BGP
Maximilan Wilhelm596 views
Building your own sdn with debian linux salt stack and python by Maximilan Wilhelm
Building your own sdn with debian linux salt stack and pythonBuilding your own sdn with debian linux salt stack and python
Building your own sdn with debian linux salt stack and python
Maximilan Wilhelm1.5K views
AS201701 - Building an Internet backbone with pure 1he servers and Linux by Maximilan Wilhelm
AS201701 - Building an Internet backbone with pure 1he servers and LinuxAS201701 - Building an Internet backbone with pure 1he servers and Linux
AS201701 - Building an Internet backbone with pure 1he servers and Linux
Maximilan Wilhelm360 views

Recently uploaded

How to think like a threat actor for Kubernetes.pptx by
How to think like a threat actor for Kubernetes.pptxHow to think like a threat actor for Kubernetes.pptx
How to think like a threat actor for Kubernetes.pptxLibbySchulze1
5 views33 slides
PORTFOLIO 1 (Bret Michael Pepito).pdf by
PORTFOLIO 1 (Bret Michael Pepito).pdfPORTFOLIO 1 (Bret Michael Pepito).pdf
PORTFOLIO 1 (Bret Michael Pepito).pdfbrejess0410
8 views6 slides
Building trust in our information ecosystem: who do we trust in an emergency by
Building trust in our information ecosystem: who do we trust in an emergencyBuilding trust in our information ecosystem: who do we trust in an emergency
Building trust in our information ecosystem: who do we trust in an emergencyTina Purnat
100 views18 slides
WEB 2.O TOOLS: Empowering education.pptx by
WEB 2.O TOOLS: Empowering education.pptxWEB 2.O TOOLS: Empowering education.pptx
WEB 2.O TOOLS: Empowering education.pptxnarmadhamanohar21
16 views16 slides
Marketing and Community Building in Web3 by
Marketing and Community Building in Web3Marketing and Community Building in Web3
Marketing and Community Building in Web3Federico Ast
12 views64 slides
DU Series - Day 4.pptx by
DU Series - Day 4.pptxDU Series - Day 4.pptx
DU Series - Day 4.pptxUiPathCommunity
106 views28 slides

Recently uploaded(10)

How to think like a threat actor for Kubernetes.pptx by LibbySchulze1
How to think like a threat actor for Kubernetes.pptxHow to think like a threat actor for Kubernetes.pptx
How to think like a threat actor for Kubernetes.pptx
LibbySchulze15 views
PORTFOLIO 1 (Bret Michael Pepito).pdf by brejess0410
PORTFOLIO 1 (Bret Michael Pepito).pdfPORTFOLIO 1 (Bret Michael Pepito).pdf
PORTFOLIO 1 (Bret Michael Pepito).pdf
brejess04108 views
Building trust in our information ecosystem: who do we trust in an emergency by Tina Purnat
Building trust in our information ecosystem: who do we trust in an emergencyBuilding trust in our information ecosystem: who do we trust in an emergency
Building trust in our information ecosystem: who do we trust in an emergency
Tina Purnat100 views
Marketing and Community Building in Web3 by Federico Ast
Marketing and Community Building in Web3Marketing and Community Building in Web3
Marketing and Community Building in Web3
Federico Ast12 views
UiPath Document Understanding_Day 3.pptx by UiPathCommunity
UiPath Document Understanding_Day 3.pptxUiPath Document Understanding_Day 3.pptx
UiPath Document Understanding_Day 3.pptx
UiPathCommunity105 views
IETF 118: Starlink Protocol Performance by APNIC
IETF 118: Starlink Protocol PerformanceIETF 118: Starlink Protocol Performance
IETF 118: Starlink Protocol Performance
APNIC297 views

Netzwerkgrundlagen - Von Ethernet bis IP

  • 1. Netzwerkgrundlagen - Von Ethernet bis IP FrOSCon 13 Network Track Falk Stern, Maximilian Wilhelm 1 / 33
  • 2. Agenda 1. Who's who 2. Models 3. Ethernet 4. IPv4 5. Linux Hands-on 2 / 33
  • 3. Who's who Falk Stern Full Stack Infrastructure Engineer IPv6 fanboy Runs his own Kubernetes cluster in his basement Consultant @ Profi Engineering Systems AG Contact @wrf42 falk@fourecks.de 3 / 33
  • 4. Who's who Maximilian Wilhelm Networker OpenSource Hacker Fanboy of (Debian) Linux ifupdown2 Occupation: By day: Senior Infrastructure Architect, Uni Paderborn By night: Infrastructure Archmage, Freifunk Hochstift In between: Freelance Solution Architect for hire Contact @BarbarossaTM max@sdn.clinic 4 / 33
  • 5. Who's who Models Layer models - ISO/OSI, TCP/IP & Hybrid 5 / 33
  • 6. Who's who Models Layer models - ISO/OSI, TCP/IP & Hybrid Physical Wires, Wireless - 802.3 & 802.11 (Bit) Data Link Addressing stations on the same physical medium (Ethernet MAC) (Frame) Network Adressing stations somewhere in the entire network (IPv4, IPv6) (Packet) Transport How to transport data? (Datagram, Segment) Session, Presentation, Application Which data to transport? (SSH, IRC, HTTP, etc.) 6 / 33
  • 8. Who's who Models Ethernet Hardware - What does it look like? Source: Wikimedia commons 8 / 33
  • 9. Who's who Models Ethernet Ethernet Developed between 1973 and 1974 at Xerox Inspired by ALOHAnet, the Packet Radio Network on Hawaii At first available with 2,94 Mbps, 10 Mbps available commercially since 1980 Further development lead to IEEE standard 802.3 in 1983 CSMA/CD - "Carrier Sense, Multiple Access, Collision Detect" Ethernet today: Common access port speed: 1 Gbit/s Common uplink/server interfaces speed: 10 - 40 Gbit/s Up to 400-Gbit/s available commercially Interfaces for copper or multi-mode / single-mode fiber Preamble SFD Source MAC Address Destination MAC Address EtherType FCSPayload Source: Wikimedia Commons 9 / 33
  • 10. Who's who Models Ethernet Ethernet Technology Repeater Maximum Segmentlength in on network segment around 100m Repeater amplify and repeat signals Extend broadcast domains Extend collision domains Bridges Extend broadcast domains Limit collision domains Important Rule: Frames must not be send out on port where they were received 10 / 33
  • 11. Who's who Models Ethernet Ethernet Devices Hubs Repeater with many ports Switches Bridges with many ports Three possible actions to happen with any frame: Forward Replicate Drop 11 / 33
  • 12. Who's who Models Ethernet Addresses Format: AA:BB:CC:DD:EE:FF Identify stations on the same physical medium Should to unique (on the medium) 1st octet 2nd octet 3rd octet 4th octet 5th octet 6th octet 6 octets or Organisationally Unique Identifier (OUI) Network Interface Controller (NIC) Specific 3 octets 3 octets b7 b6 b5 b4 b3 b2 b1 b0 8 bits 0: 1: unicast multicast 0: 1: globally unique (OUI enforced) locally administered Source: Wikipedia Commons 12 / 33
  • 13. Who's who Models Ethernet Linux command line example $ ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000 link/ether 70:5a:0f:cf:21:f3 brd ff:ff:ff:ff:ff:ff 3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000 link/ether 64:80:99:cf:66:6f brd ff:ff:ff:ff:ff:ff 13 / 33
  • 14. Who's who Models Ethernet Spanning Tree Protocol for loop prevention within ethernet networks Create logical tree of network topology based on BPDUs Will block connections which will produce loops Only deactivate STP if you really know better Seriously! 14 / 33
  • 16. Who's who Models Ethernet IPv4 IPv4 Adresses Identify stations within and beyond subnets Up to - but not limited to - the Internet 32bit long Composed of 4 octets 127.0.0.1 94.45.240.1 Subdived into network and host part What is now known as the Internet started as a research project in the 1970s to design and develop a set of protocols that could be used with many different network technologies to provide a seamless, end- to-end facility for interconnecting a diverse set of end systems. Source: RFC4632, Section 2 16 / 33
  • 17. Who's who Models Ethernet IPv4 Network Classes (historical!) Deprecated since 1993 (RFC1519)!!1! Long live CIDR / VLSM Correct and complete definition given for historical attribution only! DO NOT USE IN REAL LIFE ANYMORE! SRSLY! Class Binary Prefix IP Space Default Mask A 0... 0.0.0.0 - 127.255.255.255 /8 B 10.. 128.0.0.0 - 191.255.255.255 /16 C 11.. 192.0.0.0 - 223.255.255.255 /24 D 1110 224.0.0.0 - 239.255.255.255 E 1111 240.0.0.0 - 255.255.255.255 17 / 33
  • 18. Who's who Models Ethernet IPv4 Subnetting - CIDR / VLSM Classless InterDomain Routing Variable Length Subnet Mask Introduced in 1993, RFC4632 (original RFC1519) Prefix Notation -> Number of bits in network part of address 255.255.255.0 == 24 Bit netmask == /24 18 / 33
  • 19. Who's who Models Ethernet IPv4 Pre xes to know/ Private stu Loopback 127.0.0.0/8 RFC1918 - Private Address Space 10.0.0.0/8, 172.16.0.0/12 und 192.168.0.0/16 RFC3927 - APIPA / Link-Local 169.254.0.0/16 RFC6598 - Shared Address Space (CGN) 100.64.0.0/10 RFC5737 - Documentation prefixes 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 RFC8190 - Special-Purpose IP Address Registries Complete list of special prefixes 19 / 33
  • 20. Who's who Models Ethernet IPv4 ARP - Address Resolution Protocol Glue between Ethernet and IP Simple protocol to resolve MAC address of IP peer Two messages types who-has is-at A B ARP WHO-HAS 192.168.1.1 192.168.1.1 IS-AT C0:FF:EE:BA:BE:01 A B 20 / 33
  • 21. Who's who Models Ethernet IPv4 Routing Every device speaking IP has a routing table German translation according to IBM: "Leitwegtabelle" Packets are forwarded according to longest prefix match Default Gateway or Gateway of last resort used if no entry matches Hot Potato principle Packets forwarded to next hop w/o knowledge of their routing table Asymmetric routing Path to destination and return path don't have to be identical Routing table of your laptop right now: Prefix Iface / Next Hop 94.45.240.0/20 wlan0 0.0.0.0/0 94.45.240.1 21 / 33
  • 22. Who's who Models Ethernet IPv4 Source Address Selection With every routing decision for a locally originated connection a source address is selected based on the routing table. Usually the (primary) IP configured on the outgoing interface May be explicitly set to any IP For example IP on loopback interface Prefix Iface / Next Hop Src Address 94.45.240.0/20 wlan0 94.45.242.23 192.168.0.0/24 eth0 192.168.0.42 0.0.0.0/0 94.45.240.1 22 / 33
  • 23. Who's who Models Ethernet IPv4 MTU/MSS Maximum Transmission Unit Maximum size of a frame Usually 1500 Bytes in Ethernet networks Usually >= 9000 Bytes in service provider backbones (Jumbo Frames) Maximum Segment Size Maximum size of a segment which fits into a TCP packet MTU - 60 Bytes 23 / 33
  • 24. Who's who Models Ethernet IPv4 Where to get IP addresses? 24 / 33
  • 25. Who's who Models Ethernet IPv4 IP delegation hierarchy Source: Obtaining IPv4 - Andrew de la Haye - RIPE Regional Meeting 2014 25 / 33
  • 27. Who's who Models Ethernet IPv4 Linux Network con guration on Linux R.I.P. ifconfig R.I.P. route R.I.P. arp R.I.P. vlan R.I.P. brctl R.I.P. tunctl <Moment of Silence/> Long live iproute2 27 / 33
  • 28. Who's who Models Ethernet IPv4 Linux iproute - Networkers Swiss Army Nife Functions segregated into sub commands Lazy admin friendly: Commands can be shortend ip link Layer2 configuration Vlans Bridges ip addr Layer3 configuration / IP addresses ip route Routing ip neigh ARP / ND 28 / 33
  • 29. Who's who Models Ethernet IPv4 Linux ip link ip link set { DEVICE | dev DEVICE } [ { up | down } ] [ promisc { on | off } ] [ name NEWNAME ] [ address LLADDR ] [ mtu MTU ] [ master DEVICE ] [ nomaster ] [...] ip link show [ DEVICE ] 29 / 33
  • 30. Who's who Models Ethernet IPv4 Linux ip addr Usage: ip addr {add|change|replace} IFADDR dev STRING [ LIFETIME ] [...] ip addr del IFADDR dev STRING ip addr {show|flush} [ dev STRING ] [ scope SCOPE-ID ] [ to PREFIX ] [ FLAG-LIST ] [ label PATTERN ] IFADDR := PREFIX | ADDR peer PREFIX [ broadcast ADDR ] [ anycast ADDR ] [ label STRING ] [ scope SCOPE-ID ] SCOPE-ID := [ host | link | global | NUMBER ] [...] 30 / 33
  • 31. Who's who Models Ethernet IPv4 Linux ip route Usage: ip route { list | flush } SELECTOR ip route { add | del | change | append | replace } ROUTE SELECTOR := [ root PREFIX ] [ match PREFIX ] [ exact PREFIX ] [ table TABLE_ID ] [ proto RTPROTO ] [ type TYPE ] [ scope SCOPE ] ROUTE := NODE_SPEC [ INFO_SPEC ] NODE_SPEC := [ TYPE ] PREFIX [ tos TOS ] [ table TABLE_ID ] [ proto RTPROTO ] [ metric METRIC ] INFO_SPEC := NH OPTIONS FLAGS [ nexthop NH ]... NH := [ via ADDRESS ] [ dev STRING ] [ weight NUMBER ] NHFLAGS [...] 31 / 33
  • 32. Who's who Models Ethernet IPv4 Linux ip neigh Usage: ip neigh { add | del | change | replace } { ADDR [ lladdr LLADDR ] [ nud STATE ] | proxy ADDR } [ dev DEV ] ip neigh { show | flush } [ proxy ] [ to PREFIX ] [ dev DEV ] [ nud STATE ] [ vrf NAME ] STATE := { permanent | noarp | stale | reachable | none | incomplete | delay | probe | failed } 32 / 33