Why is UDP needed?

gojericho0gojericho0 Member Posts: 1,059 ■■■□□□□□□□
I got to thinking of this when I was doing some packet captures. Why is UDP header used with a unique port number instead of just assigning each application a unique ID in the IP header?

Wouldn't this still allow application multiplexing and allow less packet overhead?

Comments

  • UnixGuyUnixGuy Mod Posts: 4,570 Mod
    I thought each UDP (or TCP) packet has the port number of the application it's destined to ?
    Certs: GSTRT, GPEN, GCFA, CISM, CRISC, RHCE

    Learn GRC! GRC Mastery : https://grcmastery.com 

  • tierstentiersten Member Posts: 4,505
    The IP protocol field is only 8 bits. Most of them have been preassigned in RFC790.
    You'll end up with nasty hacks and special cases because you're overloading the field and not using it for its intended purpose. The layers are split for a reason. IP is for routing.
  • tierstentiersten Member Posts: 4,505
    UnixGuy wrote: »
    I thought each UDP (or TCP) packet has the port number of the application it's destined to ?
    It does. gojericho0 wants to know why you don't just use the protocol field in the IP header as a port number.
  • gojericho0gojericho0 Member Posts: 1,059 ■■■□□□□□□□
    tiersten wrote: »
    The IP protocol field is only 8 bits. Most of them have been preassigned in RFC790.
    You'll end up with nasty hacks and special cases because you're overloading the field and not using it for its intended purpose. The layers are split for a reason. IP is for routing.

    Thanks! this cleared things up greatly.
Sign In or Register to comment.