分享
 
 
 

关于line命令[必读]

王朝other·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

line

To identify a specific line for configuration and start the line configuration command collection mode, use the line global configuration command.

line [aux | console | tty | vty] line-number [ending-line-number]

Syntax Description

aux

(Optional) Auxiliary EIA/TIA-232 DTE port. Must be addressed as relative line 0. The auxiliary port can be used for modem support and asynchronous connections.

console

(Optional) Console terminal line. The console port is DCE.

tty

(Optional) Standard asynchronous line.

vty

(Optional) Virtual terminal for remote console access.

line-number

The relative number of the terminal line (or the first line in a contiguous group) that you want to configure when the line type is specified. Numbering begins with zero.

ending-line-number

(Optional) The relative number of the last line in a contiguous group that you want to configure. If you omit the keyword, then line-number and ending-line-number are absolute rather than relative line numbers.

Default

There is no default line.

Command Mode

Global configuration

Usage Guidelines

This command first appeared in Cisco IOS Release 10.0.

You can address a single line or a consecutive range of lines with the line command. A line number is necessary, though, and you will receive an error message if you forget to include it.

Entering the line command with the optional line type (AUX, CON, TTY, or VTY) designates the line number as a relative line number. For example, to configure line parameters for line 7 (a TTY line), you could enter the following:

Router(config)# line tty 7

You also can enter the line command without specifying a line type. In this case, the line number is treated as an absolute line number. For example, to configure line parameters for line 5, which can be of any type, you could enter the following:

Router(config)# line 5

Absolute line numbers increment consecutively and can be difficult to manage on large systems. Relative line numbers are a shorthand notation used in configuration. Internally, the Cisco IOS software uses absolute line numbers. You cannot use relative line numbers everywhere, but you can use absolute line numbers everywhere.

The absolute line number of the auxiliary port is 1. The relative line number of the auxiliary port is 0. See the modem line configuration command to set up modem support on the auxiliary port.

The software keeps a table of absolute and relative line numbers that you can display with the EXEC command show users all. A sample display follows:

Router show users all

Line User Host(s) Idle Location

0 con 0 chaff console

1 tty 1 Engineering printer

2 tty 2

3 tty 3 DREGGS 1:07 Katy x1111

4 tty 4 Console E3-D

5 tty 5 Mkt. demo area

6 tty 6

7 tty 7 DREGGS 14 Marie x1112

10 tty 10

. . .

135 tty 135

136 tty 136

137 tty 137 rp4-printer

140 tty 140 Braille printer

141 aux 0

142 vty 0 Denise idle DENISE-MAC.CISCO.COM

143 vty 1 Michael idle 0 DREGGS.CISCO.COM

144 vty 2

145 vty 3

146 vty 4

147 vty 5

The absolute line numbers are listed at the far left, followed by the line type, and then the relative line number. Relative line numbers always begin numbering at zero and define the type of line. Addressing the second virtual terminal line as line vty 1, for example, is easier than remembering it as line 143―its absolute line number.

The line types are ranked as follows in the line table:

1. Console 0 (con 0)

2. Standard asynchronous line (TTY)

3. Auxiliary port (aux)

4. Virtual terminal line (VTY)

5. Printer

The terminal from which you locally configure the router is attached to the console port. To configure line parameters for the console port, enter the following:

Router(config)# line con 0

The console relative line number must be 0.

Virtual terminal lines are used to allow remote access to the router. A virtual terminal line is not associated with either the auxiliary or console port. The router has five virtual terminal lines by default. However, you can create additional virtual terminal lines as described in the section "Create Additional Virtual Terminal Lines" in the "Configuring Terminal Lines and Modem Support" chapter of the Access Services Configuration Guide.

Configuring the console port or virtual terminal lines allows you to perform such tasks as setting communication parameters, specifying autobaud connections, and configuring terminal operating parameters for the terminal you are using.

Examples

To configure virtual terminal line parameters, you would enter the following:

Router(config)# line vty line-number [ending-line-number]

The following example starts configuration for virtual terminal lines 0 to 4:

line vty 0 4

Related Commands

A dagger () indicates that the command is documented outside this chapter.

show line

show users all

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有