Sunteți pe pagina 1din 11

Ethernet

Fundamentals

Topics of Discussion

• Definitions
• Topologies, Message Types
• Hardware Building Blocks
• IP Addressing
• TCP and UDP
• BootP, Ping, and Ipconfig
• Web Based Management
• WAGO Ethernet Settings

What is Ethernet?

• Most popular and widely used networking technology in the world


• Used to transmit between two or more devices over a shared medium
• Transmission rates
Standard Ethernet – 10Mbps
Fast Ethernet – 100Mbps
Gigabit Ethernet – 1000Mbps
• Access Method of Carrier Sense Multiple Access with Collision Detection
CSMA/CD
Ethernet was invented at the Xerox
Palo Alto Research Center in the
1970s by Dr. Robert M. Metcalfe.
Standardization (IEEE 802.3) took
place in 1983.

1
Normal Ethernet Operation

Example: Station “A” sends a message to station “D”

B C
Address mismatch Address mismatch
packet discarded packet discarded

Send data Address match


to node D packet processed
Transmitted packet seen
by all stations on the LAN
A (broadcast medium)
D

Data

Ethernet Collisions

Both station “A” and “C” send a message at the same time

B C
Collision

Data transmission for A Data transmission


for C
A D

CSMA/CD
A B
Carrier-Sense Multiple-Access
with Collision-Detection
CS-Carrier Sense: All stations must listen
to the network medium at all times

MA-Muliple Access:All stations have a


equal right to used this medium,
provided that it is not currently in
use by another station

CD-Collosion Detection: Since there is no


scheduling of the medium, it is
possible that two(or more) stations
may detect the idle medium and
transmit at the same time - causing
a collision and corrupting data.
Therefore, each station must sense A B
collisions, discard corrupt data, and
retransmit its data based on a
random time delay.

2
CSMA/CD

Station Ready to
Transmit Data New attempt
Wait Random
Back-off Time

Medium idle?
No

Yes Collision
Transmit Data and Detected Transmit Jam
Sense Collision Signal
No Collision
Transmit
Complete

Message Types

Unicast Broadcast

•Assigned to a single network interface •Designed to be processed by every IP


node on the same network segment (will
•Used in one-to-one communications not go through a router)
•Used in one-to-everyone
Multicast communications

•One or multiple nodes can be listening on the same or different network segments.
•Used in one-to-many communications

Destination and Source Addresses

For Unicast communications, the destination and source address


are the MAC addresses of the respective Ethernet adapter.
MAC (Media Access Control) Address – A unique 48-bit
address that is burnt into the Ethernet adapter.
• 24 Bits manufacturer ID (2 bits are reserved)
• 24 Bits adapter serial number ITEM-NO.: 750-841
Ethernet Controller

MAC_ID: 00:30:DE:00:1E:95

Example: 00-30-DE-00-00-0A

Unique serial number for each controller


WAGO manufacturer ID (given by IEEE)

3
Ethernet Building Blocks

A Repeater refreshes data without intelligence, corrupted data is not recognized and is
passed on.

A Hub is a repeater with multi-outputs to build a star topology. All stations receive
every message.

A Bridge is a smart repeater. It selectively forwards a message based on its


destination. Corrupted data is filtered. Telegrams will be only transmitted if a node
with the target address is in the connected segment.

A Switch is multi-output bridge. The switch learns about the connected nodes and
filters the information to unload the network.

A Router is a device that acts like bridge or switch, but provides more functionality.
In moving data between different network segments, routers examine a packet header
to determine the best path for the packet to travel.

Shared Ethernet

With Shared Ethernet, devices are link via a hub and communicate on a
common medium. A Message sent from one device is broadcast to all devices,
but only the correct device responds. With this configuration more collisions
occur and messages need to be retransmitted. The delay time in a Shared
Network cannot be easily calculated or predicted (non-deterministic).

Hub

Switched Ethernet

When an Ethernet Switch receives a message from a host, it saves the data and
determines the destination device. It only sends the message to the device at the
correct address. This reduces overall network traffic, and extends the
bandwidth. In many configurations, runtimes can be defined and calculated,
making it deterministic.

Switch
buffer

buffer buffer

buffer

4
Internet Protocol (IP)

• IP by itself is something like the postal system – it defines an addressing


scheme. IP also specifies the format of its packets, also called datagrams.
• IP addresses are 32 bits. Includes a network ID and a host ID.
• IP addresses are not the same as the underlying datalink (MAC) addresses.
• Every host on a network segment must have a unique IP address.
• Expressed in dotted decimal notation (e.g., 10.5.0.1)

IP
IP Data
Header
IP Datagram

Ethernet
Ethernet Data FCS
Header
Ethernet Frame

IP Configuration

Three Parameters
1) IP Address
2) Subnet mask
3) Default Gateway

Two Parts of IP Address

Dotted Dotted
Binary Notation
Decimal Decimal
IP 10.5.3.1 00001010 00000101 00000011 00000001
Subnet Mask 255.255.0.0 11111111 11111111 00000000 00000000

10.5.3.1 00001010 00000101 00000011 00000001

|------Network ID------| |----------Host ID --------|

• A binary “1” in the Subnet Mask indicates that the corresponding IP bit is
part of the Network ID

• A binary “0” in the Subnet Mask indicates that the corresponding IP bit is
part of the Host ID

5
Default Gateway

1
• Is destination local (same Network ID)?
3
Yes, add the destination MAC address to packet. • Verify packet.
No, add Default Gateway’s (router) MAC address. • Verify IP Address.
• Always add the destination’s IP address. • Send the packet up to the next layer.

2
• Verify packet.
• Decrease TTL.
• Is destination local?
Yes, add the destination MAC address.
No, add another router’s MAC address
A C
Router

B D
Router

Port Address

TCP and UDP use an abstract destination point called a port. It’s used to route
data to a particular application program on a device. Ports are identified by a
positive integer.

HTTP Application BootP

FTP Application Modbus

Port 21 Port 80 Port 502 Port 68

TCP UDP

IP – Internet Layer

Ethernet Cable
Network Access Layer

Ethernet Cable

TCP/IP Protocol

• Ethernet carries just data packets without any acknowledgement.

• IP (Internet Protocol) enables data transmission independent of the used network. No


acknowledgment.

• TCP (Transmission Control Protocol) ensures the reliability of the transmission.

TCP
TCP Data
Header
TCP Segment

IP
IP Data
Header
IP Datagram

Ethernet
Ethernet Data FCS
Header
Ethernet Frame

6
Characteristics of TCP

TCP Segment

Ethernet TCP
IP header TCP Data FCS
header header

• Connection-based protocol;
Source Port Destination Port therefore, reliable.
Sequence Number
• TCP uses IP to deliver datagrams
Acknowledgement Number to the right host.
URG
ACK
PSH
RST
SYN

Data
FIN

Reserved Window
Offset • TCP uses ports to provide
Checksum Urgent Pointer communication services to
Options Padding individual processes.

Connection-based

• Connection-based means that a virtual connection is


established before any user data is transferred.
• If the connection cannot be established – the user program is
notified.
• If the connection is ever interrupted – the user program(s) is
notified.

• Telephone Analogy – The user must establish a connection


before talking.

TCP Connection Establishment

Connection
TCP peer
initiator
CLOSED LISTEN

SYN
SYN SENT SYN RCVD

SYN-ACK
ESTABLISHED

ACK
ESTABLISHED

Data transfer

7
TCP Connection Termination

Termination
initiator TCP peer
Data transfer
ESTABLISHED ESTABLISHED

FIN-ACK
FIN WAIT-1 CLOSE WAIT

ACK
FIN WAIT-2

FIN-ACK
LAST ACK

ACK
TIME WAIT
CLOSED
(after 2*MSL)

CLOSED

TCP Transmission – Connection Established

The TCP requester sends the message on the network and the
target device acknowledges the request.
The target device then sends the reply and the requester
acknowledges the reply.

1: Control Message Sent

2: Send Ack. Received Message

3: Send Control Message Reply

4: Send Ack. Received Reply

Characteristics of UDP

(User Datagram Protocol)


UDP message

Ethernet UDP
IP header UDP Data (length varies) FCS
header header

Source Port Destination Port

Length Checksum

• Connectionless delivery with minimal overhead


• Unreliable (delivery is best effort - not guaranteed)
• UDP uses IP to deliver datagrams to the right host.
•Advantage: fast and small overhead

8
UDP Transmission

The UDP requester sends the Control Message on the


Network
When the Remote Device receives the message, it processes
the data.

1: Control Message Sent

Ping Utility

• Command-line program that is used to test a remote device’s


connectivity.
• Basically send an “Are you there?” message to another host
and waits for a response

Ipconfig Utility

Command-line program that displays the TCP/IP configuration


options on the local host, including the IP address, subnet mask,
and default gateway.

9
BootP Protocol

• Bootstrap Protocol (BootP) provides a way through which


a BootP server can assign an IP address based on its MAC
address.
• BootP operators over UDP and IP

1: Here’s my MAC address, I


need an IP address

2: Here’s your IP Address

BootP Server

Ethernet I/O

BootP with WAGO


750-880 Ethernet
Controller
The BootP-server writes the IP-
address only in the RAM-memory
(Loss the IP-Address by switching
off the voltage or reset the
controller)

WAGO Ethernet Settings

• Access Module Information:


• MAC ID
• SW/HW/FW Versions
• Serial Number
• TCP/IP Settings
• Modbus Settings
• EtherNet/IP Settings
• WebServer Settings
• Real Time Clock
• Status Information
• Protocol Ports

10
Network Setup

• Assign a Static IP address to your laptop.


• Set IP address to the 750-880 via Ethernet Settings or
Web Based Management
LAPTOP 750-880

10 .5 .0 .1 10 .5 .0 .2
255.255.255.0 255.255.0.0

Built-in Web Pages

User: admin
Password: wago

WAGO Corporation
P.O. Box 1015
Germantown, WI 53022

E-Mail: info.us@wago.com
Internet: www.wago.com

11

S-ar putea să vă placă și