curso de ip

Upload: ruiarrepiado

Post on 16-Oct-2015

16 views

Category:

Documents


0 download

TRANSCRIPT

  • IP can run on top of Ethernet, but also ATM or other transports. We look at IP over Ethernet.Ethernet has its own addresses, the MAC-Address. A MAC address looks like this: 00:20:E0:82:52:D0Its also possible to send a broadcast, then the message is read by every computer on the same subnet.Ethernet is a shared medium, like people in a room. Everybody is allowed to speak, but only when nobody else is speaking. If two persons start speaking at the same time, both stop, wait a random time and try again.

  • With the help of a Subnet-Mask (Netmask)Source and Destination IP-address have to be equal where the Netmask has 1-bits same Subnet send directlyOtherwise different Subnet use RouterA Router is often also called GatewayA Default Gateway is the router that is the all directions gateway, destination IP 0.0.0.0Same Subnet:Different Subnet:

    Source-IP 10.0.152.10Destination-IP 10.0.152.20Netmask255.255.255.0

    Source-IP 10.0.152.10Destination-IP 10.0.151.20Netmask255.255.255.0

  • Use boolean AND operationNetmask: both nodes are in same subnet if:(src-ip AND mask) == (dest-ip AND mask)same subnetdifferent subnet >> use router

    Source-IP10.0.152.100000 1010 . 0000 0000 . 1001 1000 . 0000 1010Netmask255.255.255.01111 1111 . 1111 1111 . 1111 1111 . 0000 0000Src & Mask10.0.152.00000 1010 . 0000 0000 . 1001 1000 . 0000 0000

    Destination-IP10.0.152.200000 1010 . 0000 0000 . 1001 1000 . 0001 0100Netmask255.255.255.01111 1111 . 1111 1111 . 1111 1111 . 0000 0000Dest & Mask10.0.152.00000 1010 . 0000 0000 . 1001 1000 . 0000 0000

    Destination-IP10.0.151.200000 1010 . 0000 0000 . 1001 0111 . 0001 0100Netmask255.255.255.01111 1111 . 1111 1111 . 1111 1111 . 0000 0000Dest & Mask10.0.151.00000 1010 . 0000 0000 . 1001 0111 . 0000 0000

  • Convert the Netmask to binary and count the 1-bits from the leftWrite that as /count, for example /24 equals 255.255.255.0 In a netmask, there are always 1-bits from the left and 0-bits from the rightThis shorthand version of the netmask is called CIDR NotationOnline subnet-calculator: http://www.subnet-calculator.com/cidr.php

    255.255.0.01111 1111 . 1111 1111 . 0000 0000 . 0000 0000/16255.255.248.01111 1111 . 1111 1111 . 1111 1000 . 0000 0000/21255.255.255.01111 1111 . 1111 1111 . 1111 1111 . 0000 0000/24255.255.255.1281111 1111 . 1111 1111 . 1111 1111 . 1000 0000/25

  • Broadcast Address is required for Cello nodesbroadcast = own-ip OR (NOT netmask) Shortcut: set all bits to 1 in the own IP-address where the netmask bits are zero.

    Netmask255.255.255.01111 1111 . 1111 1111 . 1111 1111 . 0000 0000NOT Netmask0000 0000 . 0000 0000 . 0000 0000 . 1111 1111Own IP10.0.152.100000 1010 . 0000 0000 . 1001 1000 . 0000 1010Broadcast:10.0.152.2550000 1010 . 0000 0000 . 1001 1000 . 1111 1111

  • To configure O&M access to a Cello node, you need to know: The NTP server is reqired for the wall clock in the node, used in the timestamps in alarms, events, traces, and for validity check of license keys. NTP is not network synchronisation!

    Own IP-address10.0.152.51Netmask255.255.255.0Default Gateway (Router)10.0.152.1Broadcast Address10.0.152.255NTP Server172.20.76.126

  • The first bit of the first byte is set to 0.0xxx xxxx.xxxx xxxx.xxxx xxxx.xxxx xxxxTherefore host addresses can range from 0.0.0.0 to 127.255.255.255. Entire IP address set to all 0s designate the default route by Cisco. The network that starts with 127 is reserved for diagnostics. For example, 127.0.0.1 which is reserved for loopback tests. Therefore the Class A network addresses can only be 1 to 126. The default netmask is 255.0.0.0 or /8network.node.node.nodeReserved private IP addresses for class A network:10.0.0.0 through 10.255.255.255

  • The first bit of the first byte is set to 1 and the second to 0.10xx xxxx.xxxx xxxx.xxxx xxxx.xxxx xxxxTherefore IP addresses can range from 128.0.0.0 to 191.255.255.255. The default netmask is 255.255.0.0 or /16.

    network.network.node.nodeReserved private IP addresses for class B network:172.16.0.0 through 172.31.255.255

  • The first 2 bits of the first byte is set to 1 and the third to 0.110x xxxx.xxxx xxxx.xxxx xxxx.xxxx xxxxTherefore IP addresses can range from 192.0.0.0 to 223.255.255.255. The default netmask is 255.255.255.0 or /24.network.network.network.node

    Reserved private IP addresses for class C network:192.168.0.0 through 192.168.255.255

  • MSCMGwVLAN=8Ethernet-cableVLAN=8VLAN=23Switch doesVLAN-taggingSwitch-CoreMSCMGwVLAN=8Switch-CoreTrunking-PortsVLAN-ID 8: SignallingVLAN-ID 23: UserplaneOn the trunking ports you still have to list the permitted VLAN-IDs!VLAN=8VLAN=23

  • Or TCP vs UDPConnection oriented:A virtual circuit is establishedIt uses sequencingIt uses acknowledgementIt uses flow control

  • Used to slow the depletion of available IP address spaceMany-to-one translation by using different ports. Also known as Port Address Translation (PAT). In theory, 65 000 hosts can use one public IP address.NAT is useful whenYou need to connect to the internet and your hosts dont have globally unique IP addressesYou change to a new ISP which requires you to renumber your networkYou need to merge two intranets with duplicate addresses

  • SCTP = TCP for Signaling, improvedKeep the good parts of TCP, improve the others:message oriented instead of byte streamparallel streams for unrelated messages. One stream does not block the othersbundling of messages to improve efficiencyimproved security (cookies to prevent SYN attacks)improved reliability:idle path supervision (heartbeat)multihoming (multiple own IP addresses and multiple paths)

  • Two own IP addresses (Multi = 2 in Ericsson)Two independent paths to destination, no shared equipment (2 boards, 2 switches, 2n routers...)One primary path selected. This means no loadsharing!Retransmissions use also secondary path to increase chances to get the message throughHeartbeat messages to supervise idle path(s)Constellations:If singlehoming, then reliability must be established on higher layer (two MTP-routes)SSSMMM

  • Association = (Local IP, Local SCTP Port, Remote IP, Remote SCTP Port)If one is different, its a different associationTwo modes: server/client: client establishes association towards server. This is the more common mode.peer-to-peer: either peer can establish associationThe local port can be a random value => Ephemeral Port. The server will just reply to whatever port the client has chosen. Requires server/client mode.In MSC and MGw the amount of configuration data is roughly the same, but grouped differently:M3uASCTPM3uASCTPMSC-S:MGW:

  • UDPTCPSCTPConnection-OrientedReliableIn-sequence delivery ( )Message boundary preservedMultihomingSupervisionAdaptive BandwidthUnitsDatagramByte StreamMessageSuited forReal-TimeFile TransferMessages

  • Check the configuration on MGw and on MSCCheck again.MGw Configuration:ifconfigO&M connection (telnet)linksetinfoIP-addresses and ports, SCTP assoc.moget sctp ipaccesshostgpb ipaccesshostet ipinterfaceMSC Configuration:IHALP:SAID=ALL;non-BladeClusterIHCLP:SAID=ALL,EPID=ALL;BladeClusterGeneral:Wireshark (formerly Ethereal)GUI Tool, very usefultcpdump w filename to capture, Wireshark to analyzeifconfig a; netstat rnOn Unix/Linux

  • ApplicationARP LayerIP LayerSend data to dest-IPIs the dest-IP in my own subnet? (Look at: src-IP + dest-IP + netmask)Send directlyLook up routing table. Do I have a route to that network?Send to the router for that networkSend to default gateway/router Look up the MAC (Ethernet) address in my ARP-cache of dest-IP of that routerof default GW Is the MAC address in the ARP cache? Send packet to MAC addressSend ARP request, who has IP ...?Receive ARP reply with dest MAC addressStore MAC address in ARP cacheyesyesnononoyes

  • My MAC address?My VLAN?yesnobroadcastnoFor my IP address?yesyesyesyesyesyesnonononoARP request?IP routing enabled?For my IP?Send ARP replyWhich protocol?Look up routing tablefoundnot foundSend DestinationUnreachableForwardpacketUDPTCPSCTPPort?Port?Port?SIPGCPSIPRTPRTCPSend to MSBFTPSSHM3uAWhich DPC?ownnot ownSend toMTP routingService Indicator?SCCPQAAL2GCP14123Subsystem No.?RANAPBSSAPHLR1422546My VLAN?no

  • LayersProtocol Data Unit (PDU)Network equipmentField to upper layerExample of protocols5-7Application PresentationSessionN/AN/AN/AFTP, SSH, HTTP, SMTP, SNMP, etc.4TransportSegmentN/APortTCP, UDP and SCTP3NetworkPacketRouterL3 SwitchProtocolIP, IPX, AppleTalk DDP, etc.2DataLinkFrameSwitchL2 SwitchLAN switchTypeIEEE 802.2 (LLC) and IEEE 802.3 (MAC), PPP, TokenRing, FDDI, HDLC, ATM and AAL, etc.1PhysicalBit StreamHubsOptical fiberCoaxTwisted pairWireless mediaN/A