











|  |
| Author |
"IP Host" Command Parameters
|
firechicken
Senior Member/Citizen
Registered: Nov 2000 Location: Country: United States State: OR Certifications: Comp TIA D Minus Certified Working on: Food Handler
Total Posts: 467
|
|
Hi everyone.
Command:
ip host <name> <tcp port number> <IP address>
Question:
Why would you want to change the default tcp port used?
Thanks!
Report this post to a moderator
|
|
01-05-01 06:32 AM
|
|
quantity
Call me Max
Registered: Nov 2000 Location: Country: USA State: Certifications: *cough* Working on:
Total Posts: 371
|
|
During TCP session it is done so we can tell the difference between sessions with different hosts. TCP well know port numbers are 21 FTP, 23 Telnet, 666 Doom, 53(shared with UDP) DNS. TCP does not use MAC or IP addresses like Datalink And Network layers. So in order to run multiple sessions with port 23 you must assign a different port for the address. Simply put, for TCP to keep order a different port is assigned per session. Keep in mind they do not assign well know ports as defined in rfc 1700 for obvious reasons. That said, they must assign 1024 and above.
Did yhis help?
Report this post to a moderator
|
|
01-05-01 07:26 AM
|
|
dmaftei
Senior Member M
Registered: Nov 2000 Location: Country: USA State: Certifications: none Working on: none
Total Posts: 2156
|
|
I'm afraid quantity is not quite right this time. First, the right syntax for the command is:
ip host name [tcp-port-number] address1 [address2...address8]
If you include a port number, that's because the host denoted by name listens for telnet requests on the port you specify, instead of 23 (the default telnet port).
An example may be the easier to follow:
ip host firechicken 1.1.1.1
ip host quantity 30 2.2.2.2
Host firechicken listens for telnet requests on the default port, so you don't have to specify the port in the ip host command. Host quantity listens for telnet requests on port 30, so you DO have to specify the port. If you don't specify the port, the IOS will use the default (23); that would result in host quantity not responding to telnet, of course because it doesn't listen to port 23.
Cheers!
Report this post to a moderator
|
|
01-05-01 10:16 AM
|
|
quantity
Call me Max
Registered: Nov 2000 Location: Country: USA State: Certifications: *cough* Working on:
Total Posts: 371
|
|
D-
And why would they listen 4 another port? Because TCP sessions need an address other than 23. Maybe we are talking about two different things? I thought the question revolved around TCP sessions? IF NOT than I am wrong. IF so, I submit to you that I am right.
pp 113-116 Sybex
Q
Report this post to a moderator
|
|
01-05-01 11:04 AM
|
|
Terje
Senior Member
Registered: Nov 2000 Location: Country: State: Certifications: Working on:
Total Posts: 476
|
|
First of all, dmaftei is right. The "IP HOST" command may be a bit strange in that it has a special format that is used for telnet only. Unlike the hosts file we are used to from unix and windows the IP HOST entries on Cisco routers are almost exclusivly used for resloving host names for telnet sessions.
quote: Originally posted by quantity:
And why would they listen 4 another port?
There is nothing preventing you from setting up your telnet server on any free port number you like. By convention port 23 is used so that the whole world knows how to find it. You might want to use another port number if:
- You want the number to be "secret" so that only you and your friends can use the telnet server (actually a bad substitute for a password)
- You need to run more than one telnet server for some reason. Only one of them can use the default port number.
Cisco access servers use non-standard telnet port numbers. I guess the IP HOST command comes in handy here. Perhaps someone else could elaborate?
Terje
Report this post to a moderator
|
|
01-05-01 03:17 PM
|
|
MadChef
A Huge Fake
Registered: Sep 2000 Location: Country: USA State: Certifications: Working on: A Sex Farm
Total Posts: 1426
|
|
Here's a situation where specifying the port number would be handy in a cisco environment, just to illustrate the point.
If you're using lock-and-key access lists on a router, telnet requests to port 23 will be used for authenticating users for traffic permitted by the access list. So as soon as someone logs into the router by telnetting to port 23, the connection drops and they're allowed to send traffic, etc.
In order to get an interactive session to manage the router, you'd need to do something like this:
line vty 3 4
login local
rotary-group 1
In order to make an interactive telnet connection (a vty session) you'll have to telnet to port 3001. If you use an ip host command on another router to identify this router, you'll need to specify tcp port 3001 in the config.
Will you ever actually see this in real life? Doubt it.
MadChef
Report this post to a moderator
|
|
01-05-01 10:45 PM
|
|
|
Forum Rules: Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author.
Posts: HTML code is OFF. Smilies are ON. vB code is ON. [IMG] code is ON. |
|
ExamNotes forum archive
|