341 | | `Ctrl-\ q` ends the kermit session. |
342 | | |
343 | | ==== Troubleshooting ==== |
344 | | |
345 | | Make sure you are root when you start up kermit. |
346 | | |
347 | | Kermit will balk if you try to log in while there is a session going on. Make sure that no one else is logged in via serial, and that you haven't forgotten to log out during a previous session. |
348 | | |
349 | | If, for some reason, you can't use kermit or have to configure the settings for your serial connection, use the following settings: |
350 | | |
351 | | * speed: 9600 |
352 | | * data bits: 8 |
353 | | * stop bits: 1 |
354 | | * Flow control: none |
355 | | * Parity: none |
356 | | |
357 | | Note, we have found that minicom doesn't seem to work too well with the switches. If you get it to work, please note it! |
| 342 | 4. '''exiting.''' `Ctrl-\ q` ends the kermit session. The command `exit` or `logout` will just log you out of the switch, but will not end the session. |
| 343 | |
| 344 | ==== Troubleshooting serial connections ==== |
| 345 | |
| 346 | * Make sure you are root when you start up kermit. |
| 347 | |
| 348 | *Kermit will balk if you try to log in while there is a session going on. Make sure that no one else is logged in via serial, and that you haven't forgotten to log out during a previous session. |
| 349 | |
| 350 | * If you get a message like this with the one-liner of `kermit -l /dev/ttyS0`. : |
| 351 | {{{ |
| 352 | ?Carrier required but not detected. |
| 353 | *********************************** |
| 354 | Hint: To CONNECT to a serial device that |
| 355 | is not presenting the Carrier Detect signal, |
| 356 | first tell C-Kermit to: |
| 357 | |
| 358 | SET CARRIER-WATCH OFF |
| 359 | |
| 360 | *********************************** |
| 361 | |
| 362 | }}} |
| 363 | type the commands given above in lowercase. |
| 364 | |
| 365 | * If, for some reason, you can't use kermit or have to configure the settings for your serial connection, use the following settings: |
| 366 | |
| 367 | * speed: 9600 |
| 368 | * data bits: 8 |
| 369 | * stop bits: 1 |
| 370 | * Flow control: none |
| 371 | * Parity: none |
| 372 | |
| 373 | Note, we have found that minicom doesn't seem to work too well with the switches. If you get it to work, please note it! |
| 374 | |
| 375 | ---- |
| 376 | == User modes and contexts == |
| 377 | |
| 378 | As with Cisco switches, you must be in privileged mode to make any configuration changes on the switch (or see the full list of commands). The magic word is "enable". |
| 379 | |
| 380 | {{{ |
| 381 | > ena <<---whole command is 'enable' |
| 382 | # |
| 383 | }}} |
| 384 | |
| 385 | Note how the switch autocompletes commands; you don't need to type the whole command. "configure" brings you to the configuration prompt, which looks like this : |
| 386 | {{{ |
| 387 | # config |
| 388 | (config)# |
| 389 | }}} |
| 390 | |
| 391 | All configurations, from port speed to the MoTD banner, are done from here. |
| 392 | |
| 393 | Here, typing different sets of commands bring you to different configuration modes specific to the feature you are trying to modify. the commands that bring you to the specialized modes are called "contexts," and typing them are called "entering a context." Some contexts we want to focus on are: |
| 394 | |
| 395 | * `vlan n` - create/configure standard VLANs, n being the VLAN ID (some number) |
| 396 | * `interface vlan n` - create/ configure a virtual interface with both Layer 2 and 3 characteristics |
| 397 | * `interface gigabitethernet 0/n` - configure specific port, n being number between 1 and 48 |
| 398 | * `line <vty|console>` - configure telnet or console parameters, respectively |
| 399 | |
| 400 | Don't worry even if these don't make sense now - The meanings of the contexts will be explained as we introduce each context. |
| 401 | |
| 402 | As you can see, when you enter a context, the prompt becomes "(config-if)#." However, this prompt doesn't indicate what context you are using; you just have to remember what you are doing. |
| 403 | {{{ |
| 404 | (config)# interface vlan 8 <<---start by entering the 'interface vlan' context |
| 405 | (config-if)# |
| 406 | (config-if)# interface gi 0/3 <<---switch to 'interface gigabitethernet' context |
| 407 | (config-if)# <<---note how prompt still shows up as "config-if" |
| 408 | }}} |
| 409 | |
| 410 | The command `exit` lets you exit from contexts and enabled mode, or lets you log out of the switch if you were just in user mode. |
| 411 | |
| 412 | [[BR]] |
| 413 | ---- |
| 414 | == Creating and configuring VLANs and VLAN interfaces == |
| 415 | |
| 416 | |
| 417 | [[BR]] |
| 418 | ---- |
| 419 | == Setting up Telnet == |
| 420 | Setting up telnet on the switch requires several steps that involve a few contexts. The steps can be outlined as the following: |
| 421 | |
| 422 | 1. Create a VLAN for telnet via the "vlan" context. For clarity (and good practice), we name our VLAN "telnet" so we know what it's used for. |
| 423 | {{{ |
| 424 | (config)# vlan 4 |
| 425 | !(config-vlan)# name "telnet" |
| 426 | !(config-vlan)# exit |
| 427 | !(config)# |
| 428 | }}} |
| 429 | 2. Assign an IP address to the VLAN. By entering the "interface vlan" context you automatically turn VLAN 4 into a VLAN interface. |
| 430 | {{{ |
| 431 | !(config)# interface vlan 4 |
| 432 | !(config-if)# ip address 192.168.10.1 255.255.255.0 |
| 433 | !(config-if)# exit |
| 434 | !(config)# |
| 435 | }}} |
| 436 | 3. Enable telnet logins to the switch. The "line vty" context allows you to do this. The numbers following the context denote which virtual terminals users can use to access the switch via telnet. Here, vty 0-2 can be used, meaning 3 users can simultaneously telnet into the switch. |
| 437 | {{{ |
| 438 | !(config)# line vty 0 2 |
| 439 | !(config-line)# exit |
| 440 | !(config)# |
| 441 | !(config)# save |
| 442 | (config)# exit |
| 443 | # |
| 444 | }}} |
| 445 | |
| 446 | |
| 447 | |
| 448 | |
| 449 | |
| 450 | There are also contexts that support ranges of interfaces/ports/VLANs. For example, to configure ports 1-4 and 30 at once: |
| 451 | {{{ |
| 452 | sw-sb09(config)# int range gigabitethernet 0/1-4, gigabitethernet 0/30 |
| 453 | sw-sb09(config-if-range)# |
| 454 | }}} |
| 455 | Note how the prompt becomes "(config-if-range)" in this case. |
441 | | === User modes and contexts === |
442 | | |
443 | | |
444 | | |
445 | | As with Cisco switches, you must be in privileged mode to make any configuration changes on the switch (or see the full list of commands). The magic word is "enable". Note how the switch autocompletes; you don't need to type the whole command: |
446 | | |
447 | | {{{ |
448 | | > ena <<---whole command is 'enable' |
449 | | # |
450 | | }}} |
451 | | |
452 | | |
453 | | "configure" brings you to the configuration prompt, which looks like this : |
454 | | {{{ |
455 | | # config |
456 | | (config)# |
457 | | }}} |
458 | | |
459 | | All configurations, from port speed to the MoTD banner, are done from here. |
460 | | |
461 | | Here, typing different sets of commands bring you to different configuration modes specific to the feature you are trying to modify. the commands that bring you to the specialized modes are called "contexts," and typing them are called "entering a context." Some contexts we want to focus on are: |
462 | | |
463 | | * `vlan n` - create/configure standard VLANs, n being the VLAN ID (some number) |
464 | | * `interface vlan n` - create/ configure a virtual interface with both Layer 2 and 3 characteristics |
465 | | * `interface gigabitethernet 0/n` - configure specific port, n being number between 1 and 48 |
466 | | * `line <vty|console>` - configure telnet or console parameters, respectively |
467 | | |
468 | | Don't worry even if these don't make sense now - The meanings of the contexts will be explained as they are introduced. |
469 | | |
470 | | As you can see, when you enter a context, the prompt becomes "(config-if)#." However, this prompt doesn't indicate what context you are using; you just have to remember what you are doing. |
471 | | {{{ |
472 | | (config)# interface vlan 8 <<---start by entering the 'interface vlan' context |
473 | | (config-if)# |
474 | | (config-if)# interface gi 0/3 <<---switch to 'interface gigabitethernet' context |
475 | | (config-if)# <<---note how prompt still shows up as "config-if" |
476 | | }}} |
477 | | |
478 | | The command `exit` lets you exit from contexts and enabled mode, or lets you log out of the switch if you were just in user mode. There are also contexts that support ranges of interfaces/ports/VLANs. For example, to configure ports 1-4 and 30 at once: |
479 | | {{{ |
480 | | sw-sb09(config)# int range gigabitethernet 0/1-4, gigabitethernet 0/30 |
481 | | sw-sb09(config-if-range)# |
482 | | }}} |
483 | | Note how the prompt becomes "(config-if-range)" in this case. |
484 | | |