= Réseau de coeur Core2 = Ce réseau d'entreprise est constitué de matériel Juniper et HP : * 2 Commutateurs HP ProCurve 2900-24P, * 4 Routeurs Juniper J4350 (le routeur Juniper 3 n'est pas fonctionnel). ---- == Informations pratiques == Numéro d'AS : 65003[[BR]] Nom de domaine : {{{core2.org}}}[[BR]] Plage d'adresses IPv4: {{{13.8.0.0/16}}}[[BR]] Plage d'adresses IPv6: {{{2d05:37::/32}}} ---- == Topologie du réseau == Topologie logique : [[Image(https://tibre.lip6.fr/trac/pfres/raw-attachment/wiki/Realisations/2011-2012/Projet/Core2/as3-J3.png, center)]] Topologie du VLAN d'administration : [[Image(https://tibre.lip6.fr/trac/pfres/raw-attachment/wiki/Realisations/2011-2012/Projet/Core2/as3-admin.png, center)]] Topologie physique : [[Image(https://tibre.lip6.fr/trac/pfres/raw-attachment/wiki/Realisations/2011-2012/Projet/Core2/as3-J3-com.png, center)]] Branchements au contrôleur de console : [[Image(https://tibre.lip6.fr/trac/pfres/raw-attachment/wiki/Realisations/2011-2012/Projet/Core2/as3-acs.png, center)]] ---- == Serveurs == __DHCP (VLAN 331)__[[BR]] IPv4 : {{{((13.8.0.30)}}} (Routeur Juniper 1)[[BR]] IPv6 : {{{2d05:37:0:332::fffe}}} (Routeur Juniper 1)[[BR]] __Web__[[BR]] IPv4 : * {{{13.8.0.1}}} ({{{medial.core2.org}}}) * {{{13.8.0.3}}} ({{{pseudol.core2.org}}}) IPv6 : * {{{2d05:37:0:332::1}}} ({{{medial.core2.org}}}) * {{{2d05:37:0:332::2}}} ({{{pseudol.core2.org}}}) Distribution : Debian Squeeze (Apache 2)[[BR]] __DNS__[[BR]] IPv4 : {{{13.8.0.3}}} ({{{pseudol.core2.org}}})[[BR]] IPv6 : {{{2d05:37:0:332::2}}} ({{{pseudol.core2.org}}})[[BR]] Distribution : Debian (bind9)[[BR]] __NTP__[[BR]] IPv4 : {{{13.8.0.3}}} ({{{pseudol.core2.org}}})[[BR]] IPv6 : {{{2d05:37:0:332::2}}} ({{{pseudol.core2.org}}})[[BR]] __Nagios/Cacti__[[BR]] IPv4 : {{{{13.8.0.3}}} ({{{pseudol.core2.org}}})[[BR]] IPv6 : {{{2d05:37:0:332::2}}} ({{{pseudol.core2.org}}})[[BR]] Serveur de supervision Nagios et Cacti[[BR]] ---- == Mots de passe == ||= Equipement =||= Login =||= Password =||= Accès =||= IPv4 =|| || Avocent ACS 5000 || {{{admin}}} || {{{avocent}}} || ssh/telnet/http || {{{10.40.130.30}}} || || Power Management || {{{admin}}} || {{{avocent}}} || telnet || N/A || || HP ProCurve 1 || {{{root}}} || {{{hp}}} || ssh/telnet || {{{13.8.0.33/28}}} || || HP ProCurve 2 || {{{root}}} || {{{hp}}} || ssh/telnet || {{{13.8.0.34/28}}} || || Routeur Juniper 1 || {{{admin}}} || {{{Juniper}}} || ssh/telnet || {{{13.8.0.35/28}}} || || Routeur Juniper 2 || {{{admin}}} || {{{Juniper}}} || ssh/telnet || {{{13.8.0.36/28}}} || || Routeur Juniper 4 || {{{admin}}} || {{{Juniper}}} || ssh/telnet || {{{13.8.0.38/28}}} || || {{{medial.core2.org}}} || {{{root}}} || {{{password}}} || ssh/console || {{{13.8.0.39/28}}} || || {{{pseudol.core2.org}}} || {{{root}}} || {{{password}}} || ssh/console || {{{13.8.0.40/28}}} || || Nagios || {{{nagiosadmin}}} || {{{password}}} || http || {{{13.8.0.40/28}}} || || Cacti || {{{admin}}} || {{{password}}} || http || {{{13.8.0.40/28}}} || ---- == Problème du routeur Juniper 3 == Site : [[http://www.cciezone.com/?p=311|CCIEZone.com]] >=== Upgrading a Juniper J4350 to 2GB Compact Flash === > >This is somewhat of an impossibility, right? Well, not really. Although not technically supported by Juniper, we are able to go above the recommended 1GB Compact Flash size on J-series routers (at least J4350s). > >This was performed on lab equipment, not production equipment. I wouldn’t advise doing anything that would violate any manufacturer’s support agreement on production equipment. Use this at your own risk – your mileage may vary, especially as it’s not following Juniper’s recommendations. Phew – disclaimer finished – now let’s move on… > >Here’s my predicament: I have two J4350s in a lab. Both routers were running an ancient version of JUNOS (JUNOS 8.2), however to move to the most recent JUNOS version (10.1), I needed to have 1GB of compact flash in the router. Well, checking where I was currently at didn’t help: > >{{{ >admin@J4350-1> show system storage >Filesystem Size Used Avail Capacity Mounted on >/dev/ad0s1a 213M 63M 148M 30% / >devfs 1.0K 1.0K 0B 100% /dev >devfs 1.0K 1.0K 0B 100% /dev/ >/dev/md0 146M 146M 0B 100% /junos >/cf 213M 63M 148M 30% /junos/cf >devfs 1.0K 1.0K 0B 100% /junos/dev/ >procfs 4.0K 4.0K 0B 100% /proc >/dev/bo0s1e 24M 5.0K 24M 0% /config >/dev/md1 168M 7.2M 147M 5% /mfs >/cf/var/jail 213M 63M 148M 30% /jail/var >devfs 1.0K 1.0K 0B 100% /jail/dev > >admin@J4350-1> >}}} > >Hmm – the /cf only shows 213M (close enough to 256MB to indicate that we have a 256MB Compact Flash (CF) card in the router). > >Okay, looking at the JUNOS release notes, it looks like I could upgrade to JUNOS 9.3 ES with 256MB of CF. This won’t get me to JUNOS 10.1 – let’s keep looking for a solution. > >The JUNOS 10.1 release notes provide a table of supported storage on the J-series routers. I looked up the 3rd-party part number on several websites (newegg.com, pricewatch.com, microcenter.com, etc.) and couldn’t find the 1GB CF card listed. > >At this point it looks like I’m stuck buying genuine Juniper CF memory. This is a good idea in a production environment, but this is a lab and I’m looking for the cheapest possible solution. > >I found a couple of the cheapest 2GB SanDisk Compact Flash cards at Microcenter (item number: SDCFH-002G-A11) for ~$16 a piece, and decided to try these before buying genuine Juniper memory. > >Since the J4350 doesn’t have any externally-accessible CF slots, you need to either replace the internal CF memory (doesn’t help you in pre-staging the new card) or use a CF-to-USB reader. I went down to the local office supply store and picked up an Ativa Compact Flash Memory Card USB drive (item number: 755-130) for ~$8.50. > >I downloaded the JUNOS 10.1 CF1024 install media image and installed it to the new 2GB compact flash card using dd in Linux: > >{{{ >gunzip junos-jsr-10.1R1.8-export-cf1024.gz >dd if=~/downloads/junos-jsr-10.1R1.8-export-cf1024 of=/dev/sdb1 >}}} > >WARNING – DO NOT USE DD UNLESS YOU KNOW WHAT YOU’RE DOING AND ARE WILLING TO ACCEPT ANY RISK OF POTENTIAL DATA LOSS – IT CAN DESTROY YOUR DRIVE/DATA/ETC.!!! DO NOT RUN THE ABOVE COMMAND ON YOUR SYSTEM, AS YOUR DRIVE STRUCTURE MIGHT BE DIFFERENT – THIS COMMAND IS SIMPLY GIVEN AS AN EXAMPLE. > >DD came back with the typical (and expected) “no unused space” when it was finished, indicating a successful write. > >Well, I plopped the CF in the J4350 and booted it up and here’s what I was greeted with an endless rebooting cycle, with the router indicating that it had a missing operating system. > >After trying several different versions of JUNOS install images (JUNOS 8.5, 9.3 and 10.5), I finally gave up and realized that dd wasn’t going to cut it (why I wasn’t sure). > >I attached the CF USB drive to the router that was operational (remember, I had two routers, one that I was tinkering with, the other that was up and running JUNOS). After attaching it, I created a snapshot on the new 2GB CF: > >{{{ >admin@J4350-1> request system snapshot media usb >error: cannot use usb media, may need to partition >}}} > >Hmm, let’s try it again, this time telling it to partition the USB media: > >{{{ >admin@J4350-1> request system snapshot media usb partition as-primary >Clearing current label... >Partitioning usb media (da0) ... >Partitions on snapshot: > > Partition Mountpoint Size Snapshot argument > a / 1024MB root-size > e /config 196MB config-size > g /data 693MB data-size >Running newfs (1024MB) on usb media / partition (da0s1a)... >Running newfs (196MB) on usb media /config partition (da0s1e)... >Running newfs (693MB) on usb media /data partition (da0s1g)... >Copying '/dev/ad0s1a' to '/dev/da0s1a' .. (this may take a few minutes) >Copying '/dev/ad0s1e' to '/dev/da0s1e' .. (this may take a few minutes) >The following filesystems were archived: / /config > >admin@J4350-1> >}}} > >This worked! I loaded the newly formatted (and pre-loaded) CF in one of the J4350s and it worked like a champ! Now, I have plenty of memory on the router: >{{{ >admin@j4350-2> show system storage >Filesystem Size Used Avail Capacity Mounted on >/dev/ad0s1a 991M 272M 709M 28% / >devfs 1.0K 1.0K 0B 100% /dev >/dev/md0 406M 406M 0B 100% /junos >/cf 991M 272M 709M 28% /junos/cf >devfs 1.0K 1.0K 0B 100% /junos/dev/ >procfs 4.0K 4.0K 0B 100% /proc >/dev/bo0s1e 189M 6.0K 187M 0% /config >/dev/md1 168M 13M 141M 9% /mfs >/cf/var/jail 991M 272M 709M 28% /jail/var >devfs 1.0K 1.0K 0B 100% /jail/dev >/dev/md2 39M 4.0K 36M 0% /mfs/var/run/utm > >admin@j4350-2> >}}} > >I’ve thought about why dd didn’t let me install the JUNOS install media images, however I don’t have an explanation for this. I tried the (non-supported) 2GB flash media with a 1024MB image, which could have caused problems (but most likely not). I also took the original (Juniper-branded) 256MB CF media and tried to use dd to load a CF256 install media to it, also resulting in failure (unable to boot off of the media). > >It wasn’t until I took the media to another Juniper router and partitioned/loaded it from this router. I was using dd on an Ubuntu 8.04 (LTS) system. I can’t imagine that dd behavior differs between distros like this, although never say never. Both the unsupported and supported media were unsuccessful when using dd. This is a little scary to me, realizing that if there hadn’t been another Juniper router available, I would’ve had to resort to using an Olive to prep (and fix the 256MB Juniper) CF media. > >Maybe this is a well-known fact – only certain OSs will let you copy over the install media, etc. I’ve never run into this, but am thankful that the CF USB drive worked on the remaining J4350 router. > >In conclusion, the two J4350s are equipped with 2GB of CF – pretty nifty, although not supported officially by Juniper! Site : [[http://www.defaultrouteuk.com/technical/articles/index.php?id=8839741048823279865#disqus_thread|defaultrouteUK]] >=== Recovering a faulty Juniper 4350 CF (with an iMac and a USB Printer) === > >Recovering a Juniper J4350 should be easy because the manual says so. Just remember to take your screwdriver ;-) > >A few weeks ago my lab router fell off the network. The console showed me repeating hash (#) symbols followed by a HEX dump of a few characters. I figured this looked bad...don’t know what happened. Since I didn’t need it right away I’ve left it until now. So time to have a go at fixing this now. > >You’ll have to remove chassis from the rack (4 cage screws). >Put the router on the bench and take off the rack ears from both sides of the chassis. >Now go to the back of the chassis and you’ll see three black screws on the top. You need to unscrew these. >Along each of the sides of the chassis (again toward the top of the case) you’ll see three more screws. Unscrew these on both sides. >Now the case lid should come off. > >{{{ >###################################################################################### >############L'$LR#S################################################################### >###################################################################################### >###################################################################################### >###################################################################################### >###################################################################################### >###################################################################################### >###################################################################################### >###################################################################################### >###################################################################################### >###################################################################################### >###################################################################################### >##################################################+#L'&LR#S########################### >###################################################################################### >###################################################################################### >###################################################################################### >}}} > >With the router lid off I now see there are 4 x PC3200 DIMMS toward the left hand side and the compact flash (256MB) is sat snugly against the motherboard. My task here is to reformat the flash with the ‘install’ image from the Juniper software download page. Now I’ve chosen 9.3 because I felt like it but notice that there are three flavours available for 256, 512 and 1024MB flash cards...choose the right one for your flash size - this one shows the 512MB version. > >I’ve gotten the image and extracted the flash from the 4350 (man that was a pain too because the fan buffer was in the way). Now, I don’t have a flash/PCMCIA slot in my iMAC but I do have a printer connected to it with a compact flash reader so I figure I’m going to give it a try with that. Flash plugged in I see this error by loading the Terminal, changing to root (sudo -i) then doing a ‘dmesg’ to see any kernel messages. > >{{{ > 0 [Level 3] [ReadUID 0] [Facility com.apple.system.fs] [ErrType 10] [ErrNo 6] >[IOType Write] [PBlkNum 246] [LBlkNum 0] [FSLogMsgID 222261612] [FSLogMsgOrder First] > 0 [Level 3] [ReadUID 0] [Facility com.apple.system.fs] [DevNode /dev/disk2sl] >[MountPt /Volumes/NO NAME] [FSLogMsgID 222261612] [FSLogMsgOrder Last] >}}} > >Check it out, maybe my luck is changing. I see /dev/disk2s1 must be my Juniper flash card. Great now I can format it. First things first I need to uncompress the gzip file I just downloaded from Juniper. The original file was junos-jsr-9.3R4.4-export-cf256.gz. I run ‘gzip -d junos-jsr-9.3R4.4-export-cf256.gz’ to extract the file. Now I run the old faithful ‘dd’ (disk duplicate) command which is fairly common on *nix platforms to copy the contents of the archive onto the flash. > >{{{ >localhost:Downloads root# dd if=./junos-jsr-9.3R4.4-export-cf256 of=/dev/disk2sl >}}} > >....I wait...and wait some more...then > >{{{ >500736+0 records in >500736+0 records out >256376832 bytes transferred in 690.853256 secs (371102 bytes/sec) >}}} > >Awesome - looks like the data is on now. So I replace the CF card into the chassis and power on (there is no way I’m putting all those screws back in just yet)..and...it didn’t work ;-( All I see is #’s and the fan keeps spinning up and down. > >So I tried a USB stick. I took out the CF card because that is booted first. Then plug the USB flash into the front of the router and power on.