Loading
Showing posts with label Configurations. Show all posts
Showing posts with label Configurations. Show all posts

#Memo : Telneting into Router with Python (using telnetlib)

% python
>>>
>>> # importing telnetlib
>>> import telnetlib
>>>
>>> # telnet into 192.168.1.1
>>> t=telnetlib.Telnet("192.168.1.1")
>>>
>>> # wait until Username is appear
>>> t.read_until("Username: ")
>>>
>>> # send the username
>>> t.write("<username>\n")
>>>
>>> # wait until Password is appear
>>> t.read_until("Password: ")
>>>
>>> # send the password
>>> t.write("<password>\n")
>>>
>>> # wait until > is appear
>>> t.read_until(">")
>>>
>>> # send the enable password
>>> t.write("<enable>\n")
>>>
>>> # wait till # is appear
>>> t.read_until("#")
>>>
>>> # Now you are in Global Configuration Mode
>>>

Cheers,
Soe Min

Point-to-Point Multilink Interface Configurations (Cisco)

ပံုမွန္ E1/T1 Serial Interface တစ္ခုမွာ 1984 kbps ရတာနဲ့ 1536kbps ရတာ၂မ်ိုးရွိပါတယ္။ (very generally)

Multilink နဲ့ဆိုရင္ Interface ၂ခုကို ေပါင္းလိုက္တဲ့ သေဘာမ်ိုးနဲ့ လုပ္လို့ရပါတယ္။ (၂ခုထက္ပိုလို့လဲရပါတယ္)

1984kbps x 2 = 3968kbps စသျဖင့္ေပါ့။

အဲဒီအတြက္ ေဟာဒီလို Cisco Router မွာ Configurations ေပးဖို့လိုပါမယ္။ (just general config)

Multilink virtual interface တစ္ခု create လုပ္ရပါမယ္။
interface Multilink1
ppp multilink
multilink-group 1

ျပီးရင္ Serial Interface မွာ multilink-group ကို အတူတူျဖစ္ေအာင္ assign လုပ္ရပါမယ္။
interace Serial0/0/0/1:0
encapsulation ppp
ppp multilink
ppp chap hostname R1
multilink-group 1
!
interace Serial0/0/0/2:0
encapsulation ppp
ppp multilink
ppp chap hostname R1
multilink-group 1
ဒါဆို Multilink function အျကမ္းဖ်င္းအလုပ္လုပ္ပါျပီ။ (ip ေတာ့ သပ္သပ္ assign လုပ္တာေတြ ရွိဦးမွာေပါ့)

Multilink interface ကို Serial Interface နဲ့ ခ်ိတ္ေနမေန သိခ်င္ရင္ေတာ့
sh ppp mu int m1
ဆိုျပီး ျကည့္ရင္
interace Serial0/0/0/1:0, no frags rcvd
interace Serial0/0/0/2:0, no frags rcvd

ဆိုျပီး ရပါမယ္။

# Multilink အျဖစ္သံုးမယ့္ interface တစ္ခုစီရဲ့ delay(latency) သိပ္ကြာလို့မရပါဘူး။ quality ကိုထိခိုက္နိုင္ပါတယ္။
# ပံုမွန္ အားျဖင့္ same carrier သံုးရင္ latency သိပ္မကြာတတ္ပါဘူး (except nodes are different and far from each others), different carrier ဆိုရင္ေတာ့ latency ကြာဖို့လမ္းပိုမ်ားပါမယ္။

cheers,
Soe Min

Debug commands and PE Router

Debug commands ေတြဟာ ပံုမွန္ CER တစ္ခုအတြက္ troubleshooting လုပ္ရာမွာ အသံုးဝင္ေပမယ့္ က်ေနာ္တို့ PER ဘက္မွာ ေတာ္ရံုတန္ရံု မလုပ္ပါဘူး။ ေဒတာ အဝင္အထြက္သိပ္မ်ားတာေျကာင့္ PER Crash ျဖစ္တဲ့အထိျဖစ္နိုင္လို့ က်ေနာ္ တို့ ပံုမွန္ troubleshooting မွာ မသံုးပါဘူး။ တစ္ခါတစ္ေလ ISDN Backup လိုင္းေတြေလာက္မွာပဲ msg ေတြလိုအပ္လို့
debug isdn q921 နဲ့ debug isdn q931 ပဲမတတ္သာမွ သံုးေလ့ရွိပါတယ္။

BGP soft-reconfiguration

BGP soft-reconfiguration ဆိုတဲ့ config ရွိေနမွ clear ip bpg * soft ဆိုတဲ့ command သံုးလို့ရပါမယ္။

soft ဆိုတာမပါရင္ BGP session တစ္ခုလံုး reset ျဖစ္သြားပါမယ္။ တကယ့္ နက္ဝပ္ျကီးေတြမွာ အဲလိုလုပ္လိုက္ customer ဆီက claim ခ်က္ခ်င္းေရာက္လာမွာ ေသခ်ာပါတယ္။ :P

ဒါေျကာင့္ က်ေနာ္ တို့ကေတာ့ ရွိသမ်ွ circuit အားလံုး soft-reconfiguration inbound command ကိုထည့္ထားပါတယ္။

ဒီလို ျကိုျပီး configure လုပ္ထားရင္
router bgp 65001
neighbor 10.1.1.2 remote-as 65002
neighbor 10.1.1.2 soft-reconfiguration inbound

ဒီလိုလုပ္လို့ရပါတယ္။
clear ip bgp * soft

တခ်ို့လဲ soft မထဲ့မိပဲ လုပ္မိသူေတြရွိပါတယ္။ custom ကို ျပန္ေတာင္းပန္ရတာနဲ့ ပိုအလုပ္ရွုပ္သြားျကပါတယ္။

က်ေနာ္ကေတာ့ soft မရိုက္ခင္ enter နွိပ္မိမွာစိုးလို့ texteditor မွာ ေရးျပီးမွ copy paste လုပ္ပါတယ္။

မာ့ခ္

BGP timers

Default အေနနဲ့ကေတာ့ keepalive is 60s, and hold time is 180s
တခ်ို့Carrier ေတြနဲ့ Interconnection လုပ္တဲ့အခါမွာ က်ေနာ္တို့ကေတာ့ ေလ်ွာ့ျပီးလုပ္ေလ့ရွိပါတယ္။
ဥပမာ keepalive 5s, hold time 15s

Router A
router bgp 65001
timers bgp 5 15
neighbor 172.17.1.2 remote-as 65002

Router B
router bgp 65002
timers bgp 5 15
neighbor 172.17.1.1 remote-as 65001

20s ေအာက္ဆိုရင္ IOS က warning ေတာ့ေပးတယ္။ ဒါေပမယ့္ လိုအပ္ေတာ့လည္း ေျပာင္းရတာေပါ့။

က်ေနာ္ဖတ္ေသာ အျခား ဘေလာ့ / ဆိုဒ္မ်ား