TCP/IP procedures and application for the GTS
Geoff Molloy
Communications and Computing Branch
Bureau of Meteorology
Australia
TCP/IP procedures and application for the GTS
Agenda• GTS Comms Evolution
• Network Topologies
• Overview of TCP/IP
• GTS IP Addressing
• Routing
• Data Transfer - TCP and FTP
• WMO standards – Sockets and FTP
TCP/IP procedures and application for the GTS
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
TCP/IP procedures and application for the GTS
Network Topology_pment Cabinet-1
_V 7,V _V 7,_V 7,_V
__V _V 7,
Head Office
_ Office_ Office_ Office
_ Office
Firewall
____wallce_wallce
_wallc
WEB FTP
_wallce
Message Switch
Internet
_rnetw
GTS
_rnet_rnetw
Regional
Public Addresses
Private or Public Addresses
Offices
TCP/IP procedures and application for the GTS
IP Address format
TCP/IP procedures and application for the GTS
IP Address format (cont.).
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.
TCP/IP procedures and application for the GTS
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.
TCP/IP procedures and application for the GTS
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
TCP/IP procedures and application for the GTS
IP addresses (cont.)• Get IP address from ISP
• Possibly get IP address from WMO
TCP/IP procedures and application for the GTS
GTS Connection with NAT_ÞmÞ_ÞmÞ_pment Cabinet-1
_ÞmÞ_Þm
_Þm
Firewall
___
_wall
10.1.1.1
_.1.1Þ__.1.1
BGP Routing
_.1.1_.1.1_.1.1
193.105.180.130193.105.180.129
_.1.1
Firewall
___
_wall
134.178.6.5
_178.6.
NAT
202.203.190.1 = 10.1.1.1
NAT Table:
TCP/IP procedures and application for the GTS How do you know which way to send ip packets – routing protocol
_pment Cabinet-1_V 7,V
_V 7,_V 7,_V
__V _V 7,
Head Office
_ Office_ Office_ Office
_ Office
Firewall
____wallce_wallce
_wallc
WEB FTP
_wallce
Message Switch
Internet
_rnetw
GTS
_rnet_rnetw
Regional
Public Addresses
Private or Public Addresses
Offices
TCP/IP procedures and application for the GTS
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.
TCP/IP procedures and application for the GTS
Example of routing tablegatekeeper-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
TCP/IP procedures and application for the GTS
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
TCP/IP procedures and application 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
TCP/IP procedures and application for the GTS
Local BGP links• Allocate AS numbers for private links out
of range: 65472 to 65535
• All GTS should not route this range.
TCP/IP procedures and application for the GTS
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#
TCP/IP procedures and application for the GTS
BGP Conifigurationrouter 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.255access-list 10 deny any
TCP/IP procedures and application for the GTS
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
TCP/IP procedures and application for the GTS
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/IP procedures and application for the GTS
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
TCP/IP procedures and application for the GTS
TCP Packet format
TCP/IP procedures and application for the GTS
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
TCP/IP procedures and application for the GTS
UDP• Connectionless not reliable
• Not used for GTS transfers
• Examples: used for network management (SNMP), voice data
TCP/IP procedures and application for the GTS
FTP• Uses 2 TCP connections: Control (port 21)
and data (port 20)
• Two modes: normal and passive.
• Used for transferring files.
TCP/IP procedures and application for the GTS
FTP OperationNormal
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
TCP/IP procedures and application for the GTS
FTP Commandsget Retrieve a fileput send a filebinary send or retrieve a file in raw binary
format (no processing) cd Change directories on the
remote systemrename Rename a file on the remote
systemHash display a ‘hash’ symbol which
indicates how much data has been sent.Ls List the directory on the
remote system.
TCP/IP procedures and application for the GTS
FTP ExampleC:\>ftp gorgon.ho.bom.gov.auConnected 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)): anonymous331 Password required for anonymous.Password:230 User gvm logged in.ftp> cd temp250 CWD command successful.ftp> binary200 Type set to I.ftp> put info.txt200 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.txt550 info.txt: No such file or directory.ftp> rename INFO.TXT final.txt350 File exists, ready for destination name.250 RNTO command successful.ftp> ls200 PORT command successful.150 Opening ASCII mode data connection for file list.test.zipfinal.txt226 Transfer complete.ftp: 62 bytes received in 0.00Seconds 62000.00Kbytes/sec.ftp>
TCP/IP procedures and application for the GTS
WMO Standards• FTP transfer
• Socket Connections
TCP/IP procedures and application for the GTS
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.
TCP/IP procedures and application for the GTS
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
TCP/IP procedures and application for the GTS
Socket Data Format
Message Message nnnlength type SOH CR CR LF or CR CR LF Heading CR CR LF ETX
(8 characters) (2 characters) nnnnn
Message length
Message length : Length from SOH to ETX (e.g. 00001826 = 1826bytes) M essage type AN: Alphanumeric, B I: B inary, FX: facsimile
TCP/IP procedures and application for the GTS
Socket Programming• See ATTACHMENT II-15
Use of TCP/IP on the GTS
TCP/IP procedures and application for 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
TCP/IP procedures and application for the GTS
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;
TCP/IP procedures and application for the GTS
FTP message format
M e s s a g e 2l e n g t h( 8 c h a c s )
M e s s a g e 1 F o r m a tI d e n t i f i e r
n n nl e n g t h S O H C R C R L F o r C R C R L F H e a d i n g T e x t C R C R L F E T X
( 8 c h a r a c t e r s ) 0 0 n n n n n
M e s s a g e l e n g t h
O p t i o n 1 . S t a r t i n g L i n e a n d E n d o f M e s s a g e p r e s e n tM e s s a g e l e n g t h : L e n g t h f r o m S O H t o E T X ( e . g . 0 0 0 0 1 8 2 6 = 1 8 2 6 b y t e s )
M e s s a g e 2 l e n g t h( 8 c h a r a c t e r s )
M e s s a g e 1 l e n g t h( 8 c h a r a c t e r s )
F o r m a tI d e n t i f i e r 0 1
F o r m a tI d e n t i f i e r 0 1
C R C R L F H e a d i n g T e x t
M e s s a g e l e n g t h
O p t i o n 2 . S t a r t i n g L i n e a n d E n d o f M e s s a g e a b s e n tM e s s a g e l e n g t h : L e n g t h f r o m f i r s t C R t o e n d o f T e x t ( e . g . 0 0 0 0 1 8 2 6 = 1 8 2 6 b y t e s )
TCP/IP procedures and application for the GTS
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
TCP/IP procedures and application for the GTS
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
TCP/IP procedures and application for the GTS
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.
TCP/IP procedures and application for the GTS
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.
TCP/IP procedures and application for the GTS
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.
TCP/IP procedures and application for the GTS
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.
TCP/IP procedures and application for the GTS
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
TCP/IP procedures and application for the GTS
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
TCP/IP procedures and application for the GTS
Email Standard• Proposed standard in documentation.
TCP/IP procedures and application for the GTS
END