Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command....

download Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Command Applies Only to the Interface Being Configured.

of 23

Transcript of Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command....

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    1/23

    o specify a RIP version to send on an interface basis, use the ip rip send version command ininterface configuration mode. Use the no form of this command to follow the global version rules.

    ip rip send version [1] [2]

    no ip rip send versionSyntax Description

    1

    (Optional) Sends only RIP Version 1 packets out the interface.

    2

    (Optional) Sends only RIP Version 2 packets out the interface.

    Defaults

    The software behaves according to the router version command.Command Modes

    Interface configurationCommand HistoryRelease

    Modification

    11.1

    This command was introduced.

    Usage Guidelines

    Use this command to override the default behavior of RIP as specified by the router version

    command. This command applies only to the interface being configured.The following example configures the interface to send both RIP Version 1 and Version 2 packetsout the interface:

    ip rip send version 1 2

    The following example configures the interface to send only RIP Version 2 packets out theinterface:

    ip rip send version 2

    Related Commands

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    2/23

    Command

    Description

    ip rip receive version

    Specifies a RIP version to receive on an interface basis.

    version

    Specifies a RIP vesrion used globally by the router.

    ip split-horizon (RIP)

    To enable the split horizon mechanism, use the ip split-horizon command in interface configurationmode. To disable the split horizon mechanism, use the no form of this command.

    ip split-horizon

    no ip split-horizonSyntax Description

    This command has no arguments or keywords.Defaults

    Default behavior varies with media type.Command Modes

    Interface configurationCommand HistoryRelease

    Modification

    10.0

    This command was introduced.

    Usage Guidelines

    For all interfaces except those for which either Frame Relay or SMDS encapsulation is enabled, thedefault condition for this command is ip split-horizon; in other words, the split horizon feature isactive. If the interface configuration includes either the encapsulation frame-relay or encapsulationsmds commands, then the default is for split horizon to be disabled. Split horizon is not disabled bydefault for interfaces using any of the X.25 encapsulations.

    Note For networks that include links over X.25 PSNs, the neighbor router configuration commandcan be used to defeat the split horizon feature. You can as an alternative explicitly specify the no ipsplit-horizon command in your configuration. However, if you do so you must similarly disable

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    3/23

    split horizon for all routers in any relevant multicast groups on that network.

    Note If split horizon has been disabled on an interface and you want to enable it, use the ip split-horizon command to restore the split horizon mechanism.

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    4/23

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    5/23

    Note In general, changing the state of the default for the ip split-horizon command is notrecommended, unless you are certain that your application requires a change in order to properlyadvertise routes. If split horizon is disabled on a serial interface (and that interface is attached to a

    packet-switched network), you must disable split horizon for all routers and access servers in anyrelevant multicast groups on that network.

    The following simple example disables split horizon on a serial link. The serial link is connected toan X.25 network:

    interface serial 0

    encapsulation x25

    no ip split-horizon

    Related Commands

    Command

    Description

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    6/23

    neighbor (RIP)

    Defines a neighboring router with which to exchange routing information.

    neighbor (RIP)

    To define a neighboring router with which to exchange routing information, use this form of theneighbor command in router configuration mode. To remove an entry, use the no form of thiscommand.

    neighbor ip-address

    no neighbor ip-addressSyntax Description

    ip-address

    IP address of a peer router with which routing information will be exchanged.

    Defaults

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    7/23

    No neighboring routers are defined.Command Modes

    Router configurationCommand HistoryRelease

    Modification

    10.0

    This command was introduced.

    Usage Guidelines

    This command permits the point-to-point (nonbroadcast) exchange of routing information. When itis used in combination with the passive-interface router configuration command, routinginformation can be exchanged between a subset of routers and access servers on a LAN.

    Multiple neighbor commands can be used to specify additional neighbors or peers.Examples

    In the following example, RIP updates are sent to all interfaces on network 10.108.0.0 exceptinterface Ethernet 1. However, in this case a neighbor router configuration command is included.This command permits the sending of routing updates to specific neighbors. One copy of therouting update is generated per neighbor.

    router rip

    network 10.108.0.0

    passive-interface ethernet 1

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    8/23

    neighbor 10.108.20.4

    Related CommandsCommand

    Description

    passive-interface

    Disables sending routing updates on an interface.

    network (RIP)

    To specify a list of networks for the Routing Information Protocol (RIP) routing process, use thisform of the network command in router configuration mode. To remove an entry, use the no form of this command.

    network network-number

    no network network-number Syntax Description

    network-number

    IP address of the network of directly connected networks.

    Defaults

    No networks are specified.Command Modes

    Router configurationCommand HistoryRelease

    Modification

    10.0

    This command was introduced.

    Usage Guidelines

    The network number specified must not contain any subnet information. There is no limit to thenumber of network commands you can use on the router. RIP routing updates will be sent andreceived only through interfaces on this network.

    RIP sends updates to the interfaces in the specified networks. Also, if an interface's network is notspecified, it will not be advertised in any RIP update.

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    9/23

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    10/23

    type

    (Optional) Interface type to which the offset-list is applied.

    number

    (Optional) Interface number to which the offset-list is applied.

    Defaults

    This command is disabled by default.Command Modes

    Router configurationCommand HistoryRelease

    Modification

    10.0

    This command was introduced.

    10.3

    The type and number arguments were added.

    11.2

    The name argument was added.

    Usage Guidelines

    The offset value is added to the routing metric. An offset-list with an interface type and interfacenumber is considered extended and takes precedence over an offset-list that is not extended.Therefore, if an entry passes the extended offset-list and the normal offset-list, the extended offset-list's offset is added to the metric.Examples

    In the following example, the router applies an offset of 10 to the router's delay component only toaccess list 21:

    offset-list 21 out 10

    In the following example, the router applies an offset of 10 to routes learned from Ethernet interface

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    11/23

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    12/23

    router rip

    no router ripSyntax Description

    This command has no arguments or keywords.

    Defaults

    No RIP routing process is defined.Command Modes

    Global configurationCommand HistoryRelease

    Modification

    10.0

    This command was introduced.

    Examples

    The following example shows how to begin the RIP routing process:

    router rip

    Related CommandsCommand

    Description

    network (RIP)

    Specifies a list of networks for the Routing Information Protocol (RIP) process.

    timers basicTo adjust RIP network timers, use the timers basic command in

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    13/23

    ############################################################################## name: main# purpose: show regular expression usage##############################################################################

    # needed for regular expressionsimport re

    # matching (actually searching since match checks beginning only)c = 'Someone, call 911.' # the string we want to match uponmo = re.search(r'call',c) # mo is a match obj instance (or None)s = mo.group(0) # s is 'call' - entire matched stringt = mo.span(0) # t is (9,13) - tuple of (start,end) posmo = re.search(r'Some(...)',c) # mo is a match obj instance (or None)s = mo.group(1) # s is 'one' - mo.group(0) is 'Someone't = mo.groups() # t is ('one') - tuple of mo.group from 1 upt = mo.span(1) # t is (4,7) - mo.span(0) is (0,7)

    # global matching (get all found, like /g in perl)i = re.finditer(r'.o.',c) # i is an iterator of all mo foundfor mo in i: print mo.group(0) # will print 'Som' 'eon'l = re.findall(r'.o.',c) # l is ['Som','eon'] - without mo, just strsl = re.findall(r'o(.)(.)',c) # l is [('m','e'),('n','e')] - groups are ok

    # substitutingg = "hello world" # the string we want to replace ing = re.sub(r'hello','world',g) # g is now 'goodbye world'

    # splitting

    l = re.split(r'\W+',c) # l is ['Someone','call','911','']l = re.split(r'(\W+)',c) # l is ['Someone',', ','call',' ','911','.','']

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    14/23

    # pattern syntax (to make things short g0 is retval.group(0), g1 is group(1))re.search(r'c.11',c) # . is anything but \n, g0 is 'call're.search(r'c.11',c,re.S) # S is singe-line, . will include \n, g0 is 'call're.search(r'911\.',c) # \ escapes metachars {}[]()^$.|*+?\, g0 is '911.'re.search(r'o..',c) # matches earliest, g0 is 'ome're.search(r'g?one',c) # ? is 0 or 1 times, g0 is 'one'

    re.search(r'cal+',c) # + is 1 or more times, g0 is 'call', * for 0 or morere.search(r'cal{2}',c) # {2} is exactly 2 times, g0 is 'call're.search(r'cal{0,3}',c) # {0,3} is 0 to 3 times, g0 is 'call', {2,} for >= 2re.search(r'S.*o',c) # matches are greedy, g0 is 'Someo're.search(r'S.*?o',c) # ? makes match non-greedy, g0 is 'So're.search(r'^.o',c) # ^ must match beginning of line, g0 is 'So're.search(r'....$',c) # $ must match end of line, g0 is '911.'re.search(r'9[012-9a-z]',c)# one of the letters in [...], g0 is '91're.search(r'.o[^m]',c) # none of the letters in [^...], g0 is 'eon're.search(r'\d*',c) # \d is digit, g0 is '911're.search(r'S\w*',c) # \w is word [a-zA-Z0-9_], g0 is 'Someone're.search(r'..e\b',c) # \b is word boundry, g0 is 'one', \B for non-boundryre.search(r' \D...',c) # \D is non-digit, g0 is ' call', \W for non-wordre.search(r'\s.*\s',c) # \s is whitespace char [\t\n ], g0 is ' call 're.search(r'\x39\x31+',c) # \x is hex byte, g0 is '911're.search(r'Some(.*),',c) # (...) extracts, g1 is 'one', g0 is 'Someone,'re.search(r'e(one|two)',c) # | means or, g0 is 'eone', g1 is 'one're.search(r'e(?:one|tw)',c)# (?:...) does not extract, g0 is 'eone', g1 is Nonere.search(r'(.)..\1',c) # \1 is memory of first brackets, g0 is 'omeo're.search(r'some',c,re.I) # I is case-insensitive, g0 is 'Some're.search(r'^Some',c,re.M) # M is multi-line, ^ will match start of each line

    Standard IO

    ############################################################################### name: main# purpose: show some basic IO and file handling##############################################################################

    # copy textual lines from input file to an output filefin = None # init fin (so cleanup will not throw)fout = None # init fout for same reason

    try: # file IO is "dangerous"fin = open("input.txt","r") # open input.txt, mode as in c fopenfout = open("output.txt","w") # open output.txt, mode as in c fopenfirst = fin.readline() # read line with "\n" at end, "" (False) on EOFprint "First line:", linefor line in fin: # implements iterator interface (readline loop)

    fout.write(line) # writes a string to a fileexcept IOError, e: # catch IOErrors, e is the instance

    print "Error in file IO: ", e # print exception info if thrownif fin: fin.close() # cleanup, close fin only if open (not None)if fout: fout.close() # cleanup, close fout only if open (not None)

    # read binary records from a filefrom struct import * # needed for struct.unpack function

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    15/23

    fin = None # init fin (so cleanup will not throw)try: # file IO is "dangerous"

    fin = open("input.bin","rb") # open input.bin in binary read modes = f.read(8) # read 8 bytes (or less) into a stringwhile (len(s) == 8): # continue as long as we have full records

    x,y,z = unpack(">HH

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    16/23

    l = map(hex,[10,20]) # run hex() on list, l is ['0xa','0x14']l = range(0,10,3) # create lists, l is [0,3,6,9]i = reduce(lambda x,y:x+y,[1,2,3,4]) # runs func as list reduces 10=((1+2)+3)+4

    # import a module (echo) from a package (Sound.Effects) to current namespaceimport Sound.Effects.echo # in code: Sound.Effects.echo.echofilter()

    from Sound.Effects import echo # in code: echo.echofilter()reload(echo) # reload imported modulefrom Sound.Effects.echo import * # in code: echofilter()

    import sys # system specific parameters and functionssys.exit("bye") # exit the program (raises SystemExit)sys.path.append('c:\\') # module search path, init from PYTHONPATH

    import math # math related operations print math.sqrt(9) # print 3

    import random # generate pseudo-random numbersf = random.random() # random float in range [0.0,1.0)i = randint(1,10) # random int in range [1,10]

    print random.choice(['a','b']) # returns a random member of the sequence

    from datetime import date # date and calendar related functionsa = date.today()-date(1981,11,21) # supports date arithmetics

    print age.days # how old am i in days?

    import zlib # compression related functionsc = zlib.compress("hello world") # c is a byte string (shorter hopefully)

    print zlib.decompress(c) # prints "hello world"

    # command execution in runtimeexec('x=1') # interpret new python code in runtimey = eval('x+1') # evaluate an python expression and ret it

    import os # operating system interfaceos.system('del *.txt') # run commands in the shell (blocking)os.startfile("calc.exe") # run commands in the shell (nonblocking)stdin,stdouterr = os.popen4('dir /b') # returns file handles for child comm.

    print stdouterr.read() # print the output, popen3 gives 3 streams

    Po

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    17/23

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    18/23

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    19/23

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    20/23

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    21/23

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    22/23

  • 8/9/2019 Use This Command to Override the Default Behavior of RIP as Specified by the Router Version Command. This Co

    23/23