Re: Ports and Protocols
From: Moe Trin (ibuprofin_at_painkiller.example.tld)
Date: 11/18/04
- Next message: Moe Trin: "Re: Ports and Protocols"
- Previous message: KG6VQE: "Re: Locking Computer Software"
- In reply to: Lam Duk: "Re: Ports and Protocols"
- Next in thread: fluidly unsure: "Re: Ports and Protocols"
- Reply: fluidly unsure: "Re: Ports and Protocols"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 18 Nov 2004 15:09:51 -0600
In article <10pnv4de8f68l4b@corp.supernews.com>, Lam Duk wrote:
>Let's assume I have a DNS server which uses the normal port 53 and UDP
>protocol.
Minor problem - DNS uses both UDP (normally) and TCP (for longer replies).
>Let us also assume I have a HTTP server, which uses the TCP protocol. I
>know I can set the server to respond on any port I want, not just the
>normal port 80.
Correct
>My question is, is it possible to set the HTTP server in this hypothetical
>setup to port 53/TCP, sharing the port 53 assignment with the DNS server,
>which uses a different protocol?
In this singular case - no, only because DNS uses both protocols. See the
RFCs (1034 and 1035). On the OTHER hand, had you chosen a different port
number, the answer is probably yes. UNIX has been doing so for years.
>My instincts tell me no, that only one service can serve a given port at
>the same time, regardless of protocol, but I've never seen that written
>down anywhere. I don't have any real life requirement for such a setup. I
>just want to fill in the blanks in my education.
Assuming the network stack was written correctly, there would be no
problem. Protocol is the tenth octet in the IP header (see RFC0791), and
the 'cargo' of an IP packet may be one of 130 different defined protocols
(http://www.iana.org/assignments/protocol-numbers) in addition to the very
common TCP or UDP or ICMP, etc. Port numbers are defined in TCP and UDP
headers (see RFC0768 and 0793) in the first four octets (two source, two
destination). Other protocols do not have port numbers (example ICMP from
RFC0792), or use a completely different concept (IGMP from RFC2236).
Old guy
- Next message: Moe Trin: "Re: Ports and Protocols"
- Previous message: KG6VQE: "Re: Locking Computer Software"
- In reply to: Lam Duk: "Re: Ports and Protocols"
- Next in thread: fluidly unsure: "Re: Ports and Protocols"
- Reply: fluidly unsure: "Re: Ports and Protocols"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|