480 likes | 1.02k Views
Geoff Molloy. Communications and Computing Branch Bureau of Meteorology Australia. Agenda. GTS Comms Evolution Network Topologies Overview of TCP/IP GTS IP Addressing Routing Data Transfer - TCP and FTP WMO standards – Sockets and FTP. GTS Comms Evolution. Asynchronous to X.25 to IP
E N D
Geoff Molloy Communications and Computing Branch Bureau of Meteorology Australia
Agenda • GTS Comms Evolution • Network Topologies • Overview of TCP/IP • GTS IP Addressing • Routing • Data Transfer - TCP and FTP • WMO standards – Sockets and FTP
GTS Comms Evolution • Asynchronous to X.25 to IP • X.25 saw the introduction of error detection and correction. • The advantages of TCP/IP include cost, simplicity and the ability to use a range of high level (application) protocols. • http (web) Remote machine logins (telnet, rlogin, remsh) FTP (File Transfer Protocol) Smtp (e-mail) remote database access
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 --+-------------+------------------------------------------------ Class A |0| NET_ID | HOST_ID | |-+-+-----------+---------------+-------------------------------| Class B |1|0| NET_ID | HOST_ID | |-+-+-+-------------------------+---------------+---------------| Class C |1|1|0| NET_ID | HOST_ID | |-+-+-+-+---------------------------------------+---------------| Class D |1|1|1|0| MULTICAST_ID | |-+-+-+-+-------------------------------------------------------| Class E |1|1|1|1| EXPERIMENTAL_ID | --+-+-+-+-------------------------------------------------------- FIGURE 5. IP Address Format. IP Address format (cont.) .
IP Addresses • Must have public addresses for inter-agency communications. • Private addresses may be used within your organisation. • Network Address Translation (NAT) is used to convert between private and public addresses • WMO allocates public addresses for GTS: possible allocation for hosts, but cannot be used for Internet connection.
IP addresses (cont.) • GTS Allocation: 193.105.177.0 to 193.105.184.0 • Private address allocations: • 10.0.0.0 to 10.255.255.255 • 172.16.0.0 to 172.16.255.255 • 192.168.0.0 to 192.168.255.255 • Subnet Mask: 2 ways to refer top this • 192.168.1.1 255.255.255.0 • 192.168.1.1/24 • /24 = 11111111 11111111 11111111 00000000
IP addresses (cont.) • Get IP address from ISP • Possibly get IP address from WMO
How do you know which way to send ip packets – routing protocol
Routing • Two types of routing: Static and Dynamic • An internal routing protocol is used within your network. • The GTS uses BGP for routing (static routes can sometimes be used for stub networks) • ATTACHMENT II-15Use of TCP/IP on the GTS give examples of setting up BGP Routing on a Cisco router – does not cover use of NAT.
Example of routing table gatekeeper-gw#sh ip route S 139.163.28.254/32 [1/0] via 139.163.79.1 B 202.245.39.0/24 [20/0] via 193.105.178.22, 2d23h S 157.128.0.0/16 [1/0] via 202.12.61.9 B 203.10.243.192/27 [20/1] via 203.10.243.13, 05:46:25
BGP • Used by WMO on GTS • Uses a tcp connection on port 179 between to routers to send updates. • Each Network is given an Autonomous System (AS) number. • WMO have allocated AS numbers out of the private AS address range for the GTS
GTS AS Numbers • Private range: 64512 through 65535 • MTN Centres and reserve: 64512 to 64639 • RA I: 64640 to 64767 • RA II: 64768 to 64895 • RA III: 64896 to 65023 • RA IV: 65024 to 65151 • RA V: 65152 to 65279 • RA VI: 65280 to 65407 • Antarctic and reserve: 65408 to 65535
Local BGP links • Allocate AS numbers for private links out of range: 65472 to 65535 • All GTS should not route this range.
Example of BGP routing gatekeeper-gw#sh ip bgp neigh 193.105.178.22 route BGP table version is 205, local router ID is 134.178.31.9 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 140.90.88.0/24 193.105.178.22 0 64520 64513 i *> 202.245.36.0 193.105.178.22 0 64520 ? *> 202.245.39.0 193.105.178.22 0 0 64520 i *> 205.156.51.96/27 193.105.178.22 0 64520 64513 i Total number of prefixes 4 gatekeeper-gw#
BGP Conifiguration router bgp 64512 no synchronization network 134.178.0.0 redistribute ospf 101 metric 20 match internal neighbor 193.105.178.22 remote-as 64520 neighbor 193.105.178.22 distribute-list 10 out neighbor 193.105.178.22 filter-list 4 in neighbor 193.105.178.22 filter-list 1 out ! ip as-path access-list 1 permit ^$ ip as-path access-list 4 permit ^64520$ ip as-path access-list 4 permit _64520$ ip as-path access-list 4 permit _64513$ ! access-list 10 permit 134.178.6.0 0.0.0.255 access-list 10 deny any
Useful cisco BGP commands • Sh tcp • Sh ip route • Sh ip bgp neighbor 1.1.1.1 route • Sh ip bgp neighbor 1.1.1.1 advert
NAT • Static and Dynamic • Static needed for GTS so that hosts inside the network can be contacted and for security. • NAT addresses must appear in BGP routing table.
TCP overview • Connection oriented and reliable. • TCP uses a port number to define connections • Connection defined by source IP address/source port and destination IP address and destination port • Can have multiple connections to the same TCP port number
Common TCP ports • ftp-data 20/tcp # File Transfer Protocol (Data) • ftp 21/tcp # File Transfer Protocol (Control) • telnet 23/tcp # Virtual Terminal Protocol • smtp 25/tcp # Simple Mail Transfer Protocol • http 80/tcp # World Wide Web HTTP • pop3 110/tcp # Post Office Protocol - V 3 • GTS ports >10000
UDP • Connectionless not reliable • Not used for GTS transfers • Examples: used for network management (SNMP), voice data
FTP • Uses 2 TCP connections: Control (port 21) and data (port 20) • Two modes: normal and passive. • Used for transferring files.
FTP Operation Normal Client host - connects to port 21 Client host “give me file on port 2345 Client/2345 host/20 –connects to port 2345 Passive Client host - connects to port 21 Client host “give me file on port 2345 Client host/2345 –connects to port 2345
FTP Commands get Retrieve a file put send a file binary send or retrieve a file in raw binary format (no processing) cd Change directories on the remote system rename Rename a file on the remote system Hash display a ‘hash’ symbol which indicates how much data has been sent. Ls List the directory on the remote system.
FTP Example C:\>ftp gorgon.ho.bom.gov.au Connected to gorgon.ho.bom.gov.au. 220 gorgon FTP server (Version 1.7.212.5 Wed May 30 12:19:42 GMT 2001) ready. User (gorgon.ho.bom.gov.au:(none)): anonymous 331 Password required for anonymous. Password: 230 User gvm logged in. ftp> cd temp 250 CWD command successful. ftp> binary 200 Type set to I. ftp> put info.txt 200 PORT command successful. 150 Opening BINARY mode data connection for INFO.TXT. 226 Transfer complete. ftp: 833 bytes sent in 0.01Seconds 83.30Kbytes/sec. ftp> rename info.txt to final.txt 550 info.txt: No such file or directory. ftp> rename INFO.TXT final.txt 350 File exists, ready for destination name. 250 RNTO command successful. ftp> ls 200 PORT command successful. 150 Opening ASCII mode data connection for file list. test.zip final.txt 226 Transfer complete. ftp: 62 bytes received in 0.00Seconds 62000.00Kbytes/sec. ftp>
WMO Standards • FTP transfer • Socket Connections
WMO Socket Connections • WMO Use TCP ports > 10000 • Suggest that use ports > 30000 • Use separate sockets for ASCII and Binary data and separate sockets for transmit and receive. • Maintain socket connection • Old sockets should be closed when a new connection to the same port from the same host occurs – avoids problems with connection loss.
WMO Sockets Continued • Use CSN (channel sequence numbers) manditory – recommend 5 character CSN • Each message is preceded by a message length field of eight ASCII characters and a message type field of two ASCII characters. • BI for binary, AN for alphanumeric or FX for facsimile
Socket Programming • See ATTACHMENT II-15Use of TCP/IP on the GTS
WMO FTP Procedures • Procedures for accumulating messages into files so as to minimise FTP overheads with short messages (applies only to existing message types); • file naming conventions for existing message types (existing AHL); • file renaming; • use of directories; • account names and passwords; • FTP sessions; • Local FTP requirements
Accumulating messages into files • Multiple messages in the one file • Messages should be accumulated in files thus: • length indicator, message 1 (8 characters); • format identifier (2 characters); • message 1; • length indicator, message 2 (8 characters); • format identifier (2 characters); • message 2; • and so on, until the last message;
File naming conventions • CCCCNNNNNNNN.ext where: • CCCC is the international four letter location identifier of the sending Centre, as defined in WMO publication No. 9, Volume C; • NNNNNNNN is a sequential number from 0 to 99999999 generated by the sending Centre; • ext is • ‘ua’ for urgent alpha numeric information • ‘ub’ for urgent binary information • ‘a’ for normal alpha numeric information • ‘b’ for normal binary information • ‘f’ for facsimile information
File renaming • most centres detect the presence of a new file by scanning a directory. • To avoid problems with the receiving centre processing a file before it has completely arrived, all sending centres must be able to remotely rename the files they send • The file shall be sent with the extent ‘.tmp’ and then renamed • Recommended that a separate directory be used for each host system which is initiating FTP sessions to avoid the possibility of filename duplication
General FTP “Rules” • Anonymous FTP may be used, but not on servers accessible from the Internet • To Limit load, only one ftp session per centre per file type • receiving Centres to delete files after they have been processed • Do not use compression of files.
FTP suggestions • Use format identifier “00” • This allows the WMO request/repeat service to recover missing data. • Use filename of *.b to exchange alphanumeric or binary messages • CCCCNNNNNNNN.b - for alpha numeric and binary • CCCCNNNNNNNN.f - for facsimile (FAX T.4) • Send one T4 chart in each file • Send up to 100 messages in a file but do not delay sending a message for more than 60 seconds. • Read incoming files at least every minute.
Socket/FTP Comparison • Sockets: • Quick, low overhead • Requires programming • Request/Repeat system can be slow • FTP • More Delays • Standard clients (less programming) • Easy to see failures and repeat transmission.
Checklist for GTS link • Link requirements: • 1. Get link addresses and private AS numbers from WMO • 2. Agree whether to use BGP or not • 3. Establish connectivity between routers.
Checklist for GTS link cont. • Use only official IP addresses • Exchange details on host names. • Declare which IP addresses in your Centre are eligible to use the GTS. • Establish an IP connection with one or more Centres. • Configure dynamic routing with BGP (or static routing) • Obtain an autonomous-system number • Check the barrier between Internet and the GTS • Filter incoming and outgoing traffic in accordance with the requirements described above
Checklist for GTS link cont. • WMO socket requirements: • Define socket/port numbers to receive on • Agree on 3 or 5 digit sequence numbers • FTP requirements: • Exchange user-id and password of receive accounts • Exchange directory names • Agree on format identifier – preferably “00” (include WMO header/trailer) • Agree on filenames. Suggest: • Exchange information on maximum messages to be in a file and delays before sending a file and delays before reading a file (not essential but is useful information) • Agree on 3 or 5 digit sequence numbers
Email Standard • Proposed standard in documentation.